Mirage Source

Free ORPG making software.
It is currently Fri Apr 26, 2024 12:41 pm

All times are UTC




Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: I got some of it
PostPosted: Mon Jan 19, 2009 11:23 am 
Offline
Regular

Joined: Sat Sep 13, 2008 1:41 am
Posts: 97
I want to change the way you pick the exp and health. I went to change to scroll bars. Right now i got the scroll bars working but it still wants to use the formula. How do i change this


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Mon Jan 19, 2009 3:56 pm 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
Search for this:

Calculate exp to give

and you should find the places that you need to change it to.


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Mon Jan 19, 2009 8:26 pm 
Offline
Regular

Joined: Sat Sep 13, 2008 1:41 am
Posts: 97
I searched for that and could not find it


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Mon Jan 19, 2009 8:34 pm 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
Press Ctrl+F and type that in exactly. It should show up in two spots, maybe more I am not sure but it's there. Should look something like this:

Code:
' Calculate exp to give attacker
        STR = Npc(NpcNum).Stat(Stats.Strength)
        DEF = Npc(NpcNum).Stat(Stats.Defense)
        Exp = STR * DEF * 2


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Mon Jan 19, 2009 9:00 pm 
Offline
Regular

Joined: Sat Sep 13, 2008 1:41 am
Posts: 97
I am really lost. I am using ms4 and cant find where to do this at. Please help me


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Mon Jan 19, 2009 9:23 pm 
Offline
Regular

Joined: Wed Jan 16, 2008 8:50 pm
Posts: 60
It is there in MS4 also, you must not be searching the whole project. It is in modPlayer, sub AttackNpc


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Tue Jan 20, 2009 12:31 am 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
Server Side.


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Tue Jan 20, 2009 2:12 am 
Offline
Regular

Joined: Sat Sep 13, 2008 1:41 am
Posts: 97
I change it but when i attack npc he dont have hp or exp so he wont die. So i decided to wait


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Tue Jan 20, 2009 2:37 am 
Offline
Regular

Joined: Wed Jan 16, 2008 8:50 pm
Posts: 60
did you make sure to delete your NPC files? It may not work properly until you do.


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Tue Jan 20, 2009 2:49 am 
Offline
Regular

Joined: Sat Sep 13, 2008 1:41 am
Posts: 97
no i did not but I think i will wait


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Tue Jan 20, 2009 3:04 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Feb 02, 2007 4:50 am
Posts: 263
Location: usa michigan centriville
hey ^^ well skills you have to delet your npcs in order for this to work correctly.

here the ho/EXP thing for ya

http://web.miragesource.com/forums/viewtopic.php?f=75&t=97

_________________
Fuck? I really joined in 2006.
Spirea, Chat Rooms, Discussions, Help. everything you need in one spot.
http://spirean.com
I love my computer, you never ask for more, you can be my princess or be my whore


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Tue Jan 20, 2009 6:33 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Aug 17, 2006 5:27 pm
Posts: 866
Location: United Kingdom
I like how we are attracting so many uber pro coders to the community lately. Yeeeehaaaaaar


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Tue Jan 20, 2009 6:50 pm 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
Quote:
[16:52] Skillzalot: i cant figure this out
[16:57] Jacob: I cant either
[16:57] Skillzalot: what are you trying to do
[16:57] Jacob: how to get away with murder
[16:57] Jacob: you?
[16:57] Skillzalot: lol
[16:58] Skillzalot: im trying to change the calculations for npc hp and exp
[16:58] Skillzalot: that way they run off of scroll bars
[16:58] Jacob: well do you have variables to hold those values?
[16:59] Skillzalot: no


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Tue Jan 20, 2009 7:02 pm 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
viewtopic.php?f=75&t=97

It's made for MS1 but use your brain and it should be easy to figure out.


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Wed Jan 21, 2009 12:25 am 
Offline
Regular

Joined: Sat Sep 13, 2008 1:41 am
Posts: 97
I change it but i got a problem.
Code:
' :::::::::::::::::::::
 ' :: Edit npc packet ::
 ' :::::::::::::::::::::
Sub HandleEditNpc(ByRef Parse() As String)
Dim n As Long

     n = CLng(Parse(1))
     
     ' Update the npc
     Npc(n).Name = Parse(2)
     Npc(n).AttackSay = Parse(3)
     Npc(n).Sprite = CInt(Parse(4))
     Npc(n).SpawnSecs = CLng(Parse(5))
     Npc(n).Behavior = CByte(Parse(6))
     Npc(n).Range = CByte(Parse(7))
     Npc(n).DropChance = CInt(Parse(8))
     Npc(n).DropItem = CByte(Parse(9))
     Npc(n).DropItemValue = CInt(Parse(10))
     Npc(n).Stat(Stats.Strength) = CByte(Parse(11))
     Npc(n).Stat(Stats.Defense) = CByte(Parse(12))
     Npc(n).Stat(Stats.SPEED) = CByte(Parse(13))
     Npc(n).Stat(Stats.Magic) = CByte(Parse(14))
     Npc(n).Quest = CByte(Parse(15))
     Npc(n).MaxHP = CByte(Parse(16))
     Npc(n).ExpGiven = CByte(Parse(17))
     
     ' Initialize the npc editor
     Call NpcEditorInit
End Sub


It highlights Npc(n).ExpGiven = CByte(Parse(17)) and says subscript out of range
ive been playing withg it for 10 mins and cant figure it out


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Wed Jan 21, 2009 3:55 am 
Offline
Regular

Joined: Sat Sep 13, 2008 1:41 am
Posts: 97
Still get subscript out of range


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Wed Jan 21, 2009 11:17 pm 
Offline
Regular

Joined: Wed Jan 16, 2008 8:50 pm
Posts: 60
Yeah, I've been playing with it for a bit too and can't get it to work. it gives me a subscript out of range message on
Code:
     Npc(n).Hp = CByte(Parse(16))
When I scroll over the Npc(n).Hp ith shows = 0, but when I scroll over the CByte(Parse(16)) it shows = Subscript out of range. I'm not sure what I'm Missing in the code. I haven't even tried to make the 2 values do anything yet, just save.


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Thu Jan 22, 2009 12:28 am 
Offline
Persistant Poster
User avatar

Joined: Thu Aug 17, 2006 5:27 pm
Posts: 866
Location: United Kingdom
Its not difficult, just make sure you are parsing all the values in the packet in exactly the same order client and server side.

From the nature of the error though (you aren't getting far enough for the above to be a problem), you are doing something very stupid like declaring the MaxHP and ExpGiven in a private event procedure. In fact, I'll bet you a tenner its something along those lines.

Either that, you are forcing too many values into the packet (you haven't constructed your sendsavenpc event proc properly), or, as I don't use ms4, there is some unforeseen but obvious complication.

Hell, are you even populating the variables at all client side? (MaxHP and ExpGiven) - could be you are trying to pull in a var that hasn't actually been populated yet, but I think vb6 defaults blank vars to 0 (false), or vbnullstring in the case of a string (since vb seems to have no concept of null, or protects us from it at least). Have you deleted your NPC's so your client isn't falling over when its trying to get information about an NPC? At what point does this blow up? Upon attempting to run the client, upon going onto a map with an npc, upon sending the npc editor...

DON'T JUST SKIM READ WHAT I SAID AND ONLY COME BACK WITH "oh it blows up when I run the client". Check everything I just said, it will either be the variable can't be reached, or you are forcing too many variables into your sendsavenpc method, I'm pretty confident its one or the other.


Last edited by Coke on Thu Jan 22, 2009 12:36 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Thu Jan 22, 2009 12:32 am 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
Code:
Npc(n).Hp = CByte(Parse(16))


Are you sure you're sending 16 different pieces in that packet?


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Thu Jan 22, 2009 12:40 am 
Offline
Regular

Joined: Sat Sep 13, 2008 1:41 am
Posts: 97
Dugor yes 16 things.

Yes i deleted my npcs. It fails when i try to open the npc editor


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Thu Jan 22, 2009 12:45 am 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
According to that tutorial, the HP and EXP are longs. You are trying to convert to Bytes, try to use CLng instead.


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Thu Jan 22, 2009 1:02 am 
Offline
Regular

Joined: Sat Sep 13, 2008 1:41 am
Posts: 97
actual it highlight Npc(n).ExpGiven = CLng(Parse(17)) and says subscript out of range


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Thu Jan 22, 2009 2:22 am 
Offline
Regular

Joined: Wed Jan 16, 2008 8:50 pm
Posts: 60
It's still failing when you type /editnpc? Mine fails after I click on an NPC to edit and send. Yes Fox, I did add everything to both sides. I planned on making a tutorial for this for MS4 if I had gotten it to work, I'll post it below, it shows exactly what I've done with it. As for forcing to many variables into it, how is that possible? I'm still pretty new, but I thought I'd had gotten a few of the basics down.

And I didn't look at the tutorial that was posted, everything that I did, I tried to do myself. I'll go back and take a look at it later though. What I was writing up wasn't done at all, it was done as far as adding the variables into the NPC file, not using them yet. I always make sure the variable is added in before I use it for anything.

SPOILER: (click to show)
First add s scrollbars to your frmNpcEditor, and rename them scrlExp and scrlHp. Make sure you keep the lblStartHp
and lblExpGiven, and set them next to your scrollbars to show you the value. Make sure you set the minimum value at 1.
Next in frmNpcEditor find these 3 subs

Code:
Private Sub scrlStrength_Change()
    lblStrength.Caption = CStr(scrlStrength.Value)
    lblStartHP.Caption = CStr(scrlStrength.Value * scrlDefense.Value)
    lblExpGiven.Caption = CStr(scrlStrength.Value * scrlDefense.Value * 2)
End Sub

Private Sub scrlDefense_Change()
    lblDefense.Caption = CStr(scrlDefense.Value)
    lblStartHP.Caption = CStr(scrlStrength.Value * scrlDefense.Value)
    lblExpGiven.Caption = CStr(scrlStrength.Value * scrlDefense.Value * 2)
End Sub

Private Sub scrlSpeed_Change()
    lblSpeed.Caption = CStr(scrlSpeed.Value)
    lblExpGiven.Caption = CStr(scrlStrength.Value * scrlDefense.Value * 2)
End Sub


And Replace with

Code:
Private Sub scrlStrength_Change()
    lblStrength.Caption = CStr(scrlStrength.Value)
End Sub

Private Sub scrlDefense_Change()
    lblDefense.Caption = CStr(scrlDefense.Value)
End Sub

Private Sub scrlSpeed_Change()
    lblSpeed.Caption = CStr(scrlSpeed.Value)
End Sub



Next add these 2 subs to your frmNpcEditor

Code:
Private Sub scrlExp_Change()
   lblExpGiven.Caption = scrlExp.Value
End Sub

Private Sub scrlHp_Change()
   lblStartHP.Caption = scrlHp.Value
End Sub


In Sub NpcEditor, underneath
Code:
    frmNpcEditor.scrlMagic.Value = Npc(EditorIndex).Stat(Stats.Magic)


Add

Code:
frmNpcEditor.scrlExp.Value = Npc(EditorIndex).Exp
frmNpcEditor.scrlHp.Value = Npc(EditorIndex).Hp


Now in Sub NpcEditorOK beneath
Code:
    Npc(EditorIndex).Stat(Stats.Magic) = frmNpcEditor.scrlMagic.Value


add
Code:
   
Npc(EditorIndex).Exp = frmNpcEditor.scrlExp.Value
Npc(EditorIndex).Hp(Stats.Magic) = frmNpcEditor.scrlHp.Value


Now in sub HandleUpdateNpc, beneath
Code:
Npc(n).Stat(Stats.Magic) = 0


add

Code:
Npc(n).Exp = 0
Npc(n).Hp = 0


Now in Sub HandleEditNpc, underneath
Code:
Npc(n).Stat(Stats.Magic) = CByte(Parse(14))
add
Code:
     Npc(n).Exp = CInt(Parse(15))
     Npc(n).Hp = CInt(Parse(16))


Now in Type NpcRec, add

Code:
Hp as integer
 Exp as Integer


Now in sub SendSaveNpc before
Code:
 & END_CHAR
add

Code:
 & SEP_CHAR & .Exp & SEP_CHAR & .Hp


Now we are done Client Side. Now for SERVER side.


In Sub HandleSaveNpc add in

Code:
    Npc(n).Exp = Val(Parse(15))
    Npc(n).Hp = Val(Parse(16))


In Sub SendEditNpcTo add

Code:
& SEP_CHAR & Npc(NpcNum).Exp & SEP_CHAR & Npc(NpcNum).Hp


Now in Type NpcRec, add

Code:
Hp as integer
 Exp as Integer


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Tue Dec 14, 2021 12:11 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 488003
audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffuserhttp://semiasphalticflux.rusemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchuckинфоtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimate.rutemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting


Top
 Profile  
 
 Post subject: Re: I got some of it
PostPosted: Thu Feb 10, 2022 2:10 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 488003
Hele136.8PERFBettBoogExceRolffeatMPEGFranClanTescJameRichBlacPaulTescPlatTescSambLoisHarrTesc
XVIIFashTescSharSkinMoisAccaNeveStevMineConfFragshalKamiCamaYoghShamAquoPierThomLionFreeAcca
PurgSimoCotoLawiAlleCotoIronbrowWillBillJameMODOWoolVentGolfKINGSilvELEGSelaRoxyDylaAnitTras
WindDestElegVictFredHenrPhilRondMaybXVIINasodiamLionWindForeMORGZoneFutuZoneRusiZenoASASWill
EditJohaBriaPETEZoltAtreZoneForeExtrZoneDaviDaveJoseElviVictZoneZoneMATLMichZoneMiLeZoneEdwa
FramMillUmogBioVMabeDormSonyBALTBookSylvXVIIIntrOlmeChicVanbSQuiTeenAVTODamiProlAutuHospJazz
RenoCreaEasyJohnPaulponyMOXIWindWindWhenGiotSonyClorTokyPediwwwaThomKareLukiSophRockCaroSigm
PlayLiviXXVIBriaGeneXVIIAcadBodiCeraJeweEricSelePhotRETAGratraggWorlSlatIronBarbSusaJacqMeta
JeanKeviPMMSLindSameVervWillJacqXVIIStarWindMadeWiimMichMajeTomaThomRobeJustSecoBoarBioVBioV
BioVDeliFranPBCHDownMegaFordErneEvenKataGarrSpecGimmtuchkasCameChil


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: Majestic-12 [Bot] and 16 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