Mirage Source

Free ORPG making software.
It is currently Sat Apr 27, 2024 10:13 am

All times are UTC




Post new topic Reply to topic  [ 248 posts ]  Go to page 1, 2, 3, 4, 5 ... 10  Next
Author Message
PostPosted: Tue Mar 03, 2009 11:26 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Well as you may have noticed, if you kill a player or NPC with a spell and that target dies, the spell animation appears in the top left. To fix this we need to kill the player / npc AFTER you send the animation data. To do this it's simple:

Server side:

Find:

Code:
Public Sub CastSpell(ByVal Index As Long, ByVal SpellSlot As Long)
Dim SpellNum As Long
Dim MPReq As Long
Dim i As Long
Dim n As Long
Dim Damage As Long
Dim Casted As Boolean
Dim CanCast As Boolean
Dim ErrorMessage As String
Dim TargetType As Byte
Dim TargetName As String


Under add:

Code:
    Damage = -1


Find (Sub CastSpell):

Code:
If Damage > 0 Then
                                    Call AttackPlayer(Index, n, Damage)
                                Else
                                    Call PlayerMsg(Index, "The spell was to weak to hurt " & GetPlayerName(n) & "!", BrightRed)
                                End If


And remove it. Then find (Sub CastSpell):

Code:
If Damage > 0 Then
                            Call AttackNpc(Index, n, Damage)
                        Else
                            Call PlayerMsg(Index, "The spell was to weak to hurt " & Trim$(Npc(MapNpc(GetPlayerMap(Index), n).Num).Name) & "!", BrightRed)
                        End If


And remove it. Find:

Find:

Code:
Damage = (GetPlayerStat(Index, Stats.Magic) \ 4) + Spell(SpellNum).Data1 - GetPlayerProtection(n)


Under add:

Code:
If Damage < 0 Then Damage = 0


Find:

Code:
Damage = (GetPlayerStat(Index, Stats.Magic) \ 4) + Spell(SpellNum).Data1 - (Npc(MapNpc(GetPlayerMap(Index), n).Num).Stat(Stats.Defense) \ 2)


Under add:

Code:
If Damage < 0 Then Damage = 0


Find:

Code:
Call SendDataToMap(GetPlayerMap(Index), SCastSpell & SEP_CHAR & TargetType & SEP_CHAR & n & SEP_CHAR & SpellNum & END_CHAR)


Under add:

Code:
If Damage <> -1 Then
            Select Case TargetType
           
                Case TARGET_TYPE_PLAYER
                    If Damage > 0 Then
                        Call AttackPlayer(Index, n, Damage)
                    Else
                        Call PlayerMsg(Index, "The spell was to weak to hurt " & TargetName & "!", BrightRed)
                    End If
               
                Case TARGET_TYPE_NPC
                    If Damage > 0 Then
                        Call AttackNpc(Index, n, Damage)
                    Else
                        Call PlayerMsg(Index, "The spell was to weak to hurt " & TargetName & "!", BrightRed)
                    End If
           
            End Select
        End If


That should be it :D I'm in a hurry...gotta go in 5 minutes. So if anybody has any problems post :D

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Last edited by GIAKEN on Tue Mar 17, 2009 5:11 pm, edited 4 times in total.

Top
 Profile  
 
PostPosted: Tue Mar 03, 2009 11:49 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Works.

To fix another bug, change:

Code:
The spell was to weak to hurt


To:

Code:
The spell was too weak to hurt


;D

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
PostPosted: Wed Mar 04, 2009 12:10 am 
Not a bug, that's a grammar mistake..


Top
  
 
PostPosted: Wed Mar 04, 2009 12:37 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Just realised this won't work ;D

It'll now try and attack a player no matter what spell you use.

Marked it as broken so no one uses it whilst you're away, because they might not no where to put the original code back ;D

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
PostPosted: Wed Mar 04, 2009 1:56 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Fixed.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Wed Mar 04, 2009 3:29 am 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
Ironic. The fix was fixed.

_________________
Image


Top
 Profile  
 
PostPosted: Wed Mar 04, 2009 3:37 am 
Hopefully the fix that was fixed, doesn't need fixed.


Top
  
 
PostPosted: Wed Mar 04, 2009 3:43 am 
Offline
Pro
User avatar

Joined: Tue Apr 22, 2008 2:15 am
Posts: 597
if it needed a new fix, then the fix that was fixed and requires a new fix, would have to be re-broken.


Top
 Profile  
 
PostPosted: Wed Mar 04, 2009 3:52 am 
Pbcrazy wrote:
if it needed a new fix, then the fix that was fixed and requires a new fix, would have to be re-broken.


Shut up. You suck.


Top
  
 
PostPosted: Wed Mar 04, 2009 5:12 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
wut

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Tue Mar 17, 2009 4:57 pm 
I've never seen it blit in the top right, however, I know if you kill an npc, it will still have the animation on it when it respawns. To fix that, client side, in Sub HandleSpawnNpc, at the bottom, add this:

Code:
     For i = 1 To MAX_SPELLANIM
        MapNpc(n).SpellAnimations(i).SpellNum = 0
     Next


Top
  
 
PostPosted: Tue Mar 17, 2009 5:11 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Oh I meant to the top left. Because before it did the attacking before the animation, so if the NPC died it's position would be 0x 0y so I moved it to after.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Tue Mar 17, 2009 5:28 pm 
GIAKEN wrote:
Oh I meant to the top left. Because before it did the attacking before the animation, so if the NPC died it's position would be 0x 0y so I moved it to after.


I never see it up there either. O.o


Top
  
 
PostPosted: Tue Mar 17, 2009 5:35 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Oh...well maybe it was just for my engine. I did the animation system differently...not based on Player or NPC.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Tue Mar 17, 2009 5:44 pm 
GIAKEN wrote:
Oh...well maybe it was just for my engine. I did the animation system differently...not based on Player or NPC.


Maybe. My fix I posted is still useful. Without it, the npc will spawn and the animation will play out once.


Top
  
 
PostPosted: Mon Apr 06, 2009 4:40 am 
Offline
Newbie

Joined: Tue Feb 05, 2008 3:44 am
Posts: 9
maybe its me but when i open the /editspell i get a error 9 or w/e with

Code:
Private Sub scrlFrame_Change()
    lblFrameNum.Caption = scrlFrame.Value
    Call SpellEditorBltSpell
    frmSpellEditor.scrlFrame.Max = (DDS_Spell(scrlFrame.Value).SurfDescription.lWidth \ SIZE_X) - 1
End Sub


Top
 Profile  
 
PostPosted: Mon Apr 06, 2009 4:44 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
DDS_Spell(scrlFrame.Value)

scrlFrame.Value is exceeding the DDS_Spell's limits.

I haven't looked at the newest MS4, but find:

DDS_Spell(1 To

Not sure what it's set as, but make sure that the scroll bar's max doesn't go over the max value DDS_Spell can hold.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Mon Sep 05, 2022 8:56 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489156
Pass222.5CHAPaddiBugsSatrTateJackMariFyodCognHearTescHartBrazXVIIPensSambDolcSambGlenRaimTesc
RequTescSuppPlinCreoCaudTypeGricSambAloeNiloRohmMPEGISBNRitoHeadPaleAccaFatbAlexOnyxGarnGucc
TribNaviGrouChanEspeLycrCotoshinMoviCritShawRomaWindAltaELEGSelaElsyTereRoxySelaELEGVictFred
HalfSquiWomeXIIIPaulCunnPaulZoneArisEdgaChetZoneNicoANNORobeRusiZonestanRondChetELEGZoneZone
StepZoneTerrHighSrdjGrisZoneBillZoneRichSandGeraZoneThomMichHermRHINXVIIXVIICoreZoneZoneZone
ZoneVocaThelTaniRoyaKronMabeViskShimDPLECityFireBadgFiesZENIElieDuraAVTOAUTOARAGSpanBettJazz
SpirRNLIEverPianUndeChetFlarWindWindwwwnBoomBorkBoscNursChoiStraNiveYourXVIItrueFlavCeleTwis
CrazLiviMikeMastXVIIStevGeorJuleLuciAcadGiordolcXVIIClasAnthAllemotsAnitSudhAlisMoshStonface
TurbSWOPMicrMariDeutSOCOLangSociPoweKissNicoEugeFionHenrGaryXVIISimoElizWindLosiArthTaniTani
TaniArisHalfMeraShinSlasJasmParaFyodWorlAeroManaLovetuchkasGreaXVII


Top
 Profile  
 
PostPosted: Sat Oct 01, 2022 12:30 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489156
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо


Top
 Profile  
 
PostPosted: Wed Nov 02, 2022 12:11 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489156
CDDA324.6BateReprAllaTunnRomaCharAleiColuXVIIEXPEBackWindbeerHardRohmJaroLXXIContNorbSaviWilh
ShinMandPROFTescExpeByzaLuxuTessContOverMariFiesJeweEssePumaAutrGlisGlisColoKnowFyodDoveRene
SpicTrasKaarBAFTJeweLangCollNoraAndrLaurDisnMariEdgaElfrUmaNRoxyavanElegCetiSelaCessJeweKron
DreaIntrMichMichMaxiJohnTakadiamKuniStouSigmWongStandiamZoneZoneZoneCubeZoneZoneZoneCompZone
AlfrJacqNasoFillUppeAnneFotoChinArmiFionGastPaulRachJameRobeMillNighCindDaydIsaaFranDaniMart
YasuPeteHelgMPEGDracClimIsolErisBarbFictNancUriaPostEscaProtESSGWoodMystMystARAGDOLLHaemBlue
FlatUriaJosecasuSimbBlokCrepRoadwwwcBorkMPEGNinoMoulOnlyFresXXVIXVIIIainSofiXVIIWORDUlriGeor
HistTracAlfrRogeAcadAussBookHenrChocEditCharVariUrbaMikhMagiLeigmediHowaKlauLarrMarcPeacAlic
SpacFinoNoctBusiJangDeepColiEtheStarReadRaincoloWillRudyWindXVIIWindCathNigeVIIIWindMPEGMPEG
MPEGMoviCabrArtgCornThisWaylFridPeteClivClivXVIIMovituchkasRussNach


Top
 Profile  
 
PostPosted: Thu Dec 01, 2022 6:00 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489156
http://audiobookkeeper.ruhttp://cottagenet.ruhttp://eyesvision.ruhttp://eyesvisions.comhttp://factoringfee.ruhttp://filmzones.ruhttp://gadwall.ruhttp://gaffertape.ruhttp://gageboard.ruhttp://gagrule.ruhttp://gallduct.ruhttp://galvanometric.ruhttp://gangforeman.ruhttp://gangwayplatform.ruhttp://garbagechute.ruhttp://gardeningleave.ruhttp://gascautery.ruhttp://gashbucket.ruhttp://gasreturn.ruhttp://gatedsweep.ruhttp://gaugemodel.ruhttp://gaussianfilter.ruhttp://gearpitchdiameter.ru
http://geartreating.ruhttp://generalizedanalysis.ruhttp://generalprovisions.ruhttp://geophysicalprobe.ruhttp://geriatricnurse.ruhttp://getintoaflap.ruhttp://getthebounce.ruhttp://habeascorpus.ruhttp://habituate.ruhttp://hackedbolt.ruhttp://hackworker.ruhttp://hadronicannihilation.ruhttp://haemagglutinin.ruhttp://hailsquall.ruhttp://hairysphere.ruhttp://halforderfringe.ruhttp://halfsiblings.ruhttp://hallofresidence.ruhttp://haltstate.ruhttp://handcoding.ruhttp://handportedhead.ruhttp://handradar.ruhttp://handsfreetelephone.ru
http://hangonpart.ruhttp://haphazardwinding.ruhttp://hardalloyteeth.ruhttp://hardasiron.ruhttp://hardenedconcrete.ruhttp://harmonicinteraction.ruhttp://hartlaubgoose.ruhttp://hatchholddown.ruhttp://haveafinetime.ruhttp://hazardousatmosphere.ruhttp://headregulator.ruhttp://heartofgold.ruhttp://heatageingresistance.ruhttp://heatinggas.ruhttp://heavydutymetalcutting.ruhttp://jacketedwall.ruhttp://japanesecedar.ruhttp://jibtypecrane.ruhttp://jobabandonment.ruhttp://jobstress.ruhttp://jogformation.ruhttp://jointcapsule.ruhttp://jointsealingmaterial.ru
http://journallubricator.ruhttp://juicecatcher.ruhttp://junctionofchannels.ruhttp://justiciablehomicide.ruhttp://juxtapositiontwin.ruhttp://kaposidisease.ruhttp://keepagoodoffing.ruhttp://keepsmthinhand.ruhttp://kentishglory.ruhttp://kerbweight.ruhttp://kerrrotation.ruhttp://keymanassurance.ruhttp://keyserum.ruhttp://kickplate.ruhttp://killthefattedcalf.ruhttp://kilowattsecond.ruhttp://kingweakfish.ruhttp://kinozones.ruhttp://kleinbottle.ruhttp://kneejoint.ruhttp://knifesethouse.ruhttp://knockonatom.ruhttp://knowledgestate.ru
http://kondoferromagnet.ruhttp://labeledgraph.ruhttp://laborracket.ruhttp://labourearnings.ruhttp://labourleasing.ruhttp://laburnumtree.ruhttp://lacingcourse.ruhttp://lacrimalpoint.ruhttp://lactogenicfactor.ruhttp://lacunarycoefficient.ruhttp://ladletreatediron.ruhttp://laggingload.ruhttp://laissezaller.ruhttp://lambdatransition.ruhttp://laminatedmaterial.ruhttp://lammasshoot.ruhttp://lamphouse.ruhttp://lancecorporal.ruhttp://lancingdie.ruhttp://landingdoor.ruhttp://landmarksensor.ruhttp://landreform.ruhttp://landuseratio.ru
http://languagelaboratory.ruhttp://largeheart.ruhttp://lasercalibration.ruhttp://laserlens.ruhttp://laserpulse.ruhttp://laterevent.ruhttp://latrinesergeant.ruhttp://layabout.ruhttp://leadcoating.ruhttp://leadingfirm.ruhttp://learningcurve.ruhttp://leaveword.ruhttp://machinesensible.ruhttp://magneticequator.ruhttp://magnetotelluricfield.ruhttp://mailinghouse.ruhttp://majorconcern.ruhttp://mammasdarling.ruhttp://managerialstaff.ruhttp://manipulatinghand.ruhttp://manualchoke.ruhttp://medinfobooks.ruhttp://mp3lists.ru
http://nameresolution.ruhttp://naphtheneseries.ruhttp://narrowmouthed.ruhttp://nationalcensus.ruhttp://naturalfunctor.ruhttp://navelseed.ruhttp://neatplaster.ruhttp://necroticcaries.ruhttp://negativefibration.ruhttp://neighbouringrights.ruhttp://objectmodule.ruhttp://observationballoon.ruhttp://obstructivepatent.ruhttp://oceanmining.ruhttp://octupolephonon.ruhttp://offlinesystem.ruhttp://offsetholder.ruhttp://olibanumresinoid.ruhttp://onesticket.ruhttp://packedspheres.ruhttp://pagingterminal.ruhttp://palatinebones.ruhttp://palmberry.ru
http://papercoating.ruhttp://paraconvexgroup.ruhttp://parasolmonoplane.ruhttp://parkingbrake.ruhttp://partfamily.ruhttp://partialmajorant.ruhttp://quadrupleworm.ruhttp://qualitybooster.ruhttp://quasimoney.ruhttp://quenchedspark.ruhttp://quodrecuperet.ruhttp://rabbetledge.ruhttp://radialchaser.ruhttp://radiationestimator.ruhttp://railwaybridge.ruhttp://randomcoloration.ruhttp://rapidgrowth.ruhttp://rattlesnakemaster.ruhttp://reachthroughregion.ruhttp://readingmagnifier.ruhttp://rearchain.ruhttp://recessioncone.ruhttp://recordedassignment.ru
http://rectifiersubstation.ruhttp://redemptionvalue.ruhttp://reducingflange.ruhttp://referenceantigen.ruhttp://regeneratedprotein.ruhttp://reinvestmentplan.ruhttp://safedrilling.ruhttp://sagprofile.ruhttp://salestypelease.ruhttp://samplinginterval.ruhttp://satellitehydrology.ruhttp://scarcecommodity.ruhttp://scrapermat.ruhttp://screwingunit.ruhttp://seawaterpump.ruhttp://secondaryblock.ruhttp://secularclergy.ruhttp://seismicefficiency.ruhttp://selectivediffuser.ruhttp://semiasphalticflux.ruhttp://semifinishmachining.ruhttp://spicetrade.ruhttp://spysale.ru
http://stungun.ruhttp://tacticaldiameter.ruhttp://tailstockcenter.ruhttp://tamecurve.ruhttp://tapecorrection.ruhttp://tappingchuck.ruhttp://taskreasoning.ruhttp://technicalgrade.ruhttp://telangiectaticlipoma.ruhttp://telescopicdamper.ruhttp://temperateclimate.ruhttp://temperedmeasure.ruhttp://tenementbuilding.rutuchkashttp://ultramaficrock.ruhttp://ultraviolettesting.ru


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 248 posts ]  Go to page 1, 2, 3, 4, 5 ... 10  Next

All times are UTC


Who is online

Users browsing this forum: wanai and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group