viciousdead Posted December 3, 2010 Author Share Posted December 3, 2010 Ok, so I wanted to make a spell, obviously it was bound to fail. How can I turn this pile of shet into a working spell? :(? I have no idea what I'm doing.. I was wanting a spell that would hit enemies around you multiply times every few seconds, I HAVE NO IDEA WHAT IM DOING. For one I'm missing a timer, two GetVar isn't even a command… Eh, someone please help. :cry:>! ``` Case SPELL_TYPE_DOT x = MapNpc(MapNum).Npc(Target).x y = MapNpc(MapNum).Npc(Target).y If isInRange(AoE, GetPlayerX(index), GetPlayerY(index), x, y) Then SendAnimation MapNum, Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_PLAYER, I AttackNpc index, I, Vital, spellnum If GetVar "\Charextras\Status\" & GetPlayerName(index) & ".ini", "Status", "BURNING STAR", 0 Then PutVar "Charextras\Status\" & GetPlayerName(index) & ".ini", "Status", "BURNING STAR", 1 ElseIf GetVar("\Charextras\Status\" & GetPlayerName(index) & ".ini", "Status", "BURNING STAR", 1) Then PutVar "Charextras\Status\" & GetPlayerName(index) & ".ini", "Status", "BURNING STAR", 2 ElseIf GetVar("\Charextras\Status\" & GetPlayerName(index) & ".ini", "Status", "BURNING STAR", 2) Then PutVar "Charextras\Status\" & GetPlayerName(index) & ".ini", "Status", "BURNING STAR", 3 ElseIf GetVar("\Charextras\Status\" & GetPlayerName(index) & ".ini", "Status", "BURNING STAR", 3) Then PutVar "Charextras\Status\" & GetPlayerName(index) & ".ini", "Status", "BURNING STAR", 4 ElseIf GetVar("\Charextras\Status\" & GetPlayerName(index) & ".ini", "Status", "BURNING STAR", 4) Then PutVar "Charextras\Status\" & GetPlayerName(index) & ".ini", "Status", "BURNING STAR", 5 End If End If If GetVar("Charextras\Status" & GetPlayerName & ".ini", "Status", "BURNING STAR", 5) Then DidCast = True End Select Else Loop End If``` Link to comment Share on other sites More sharing options...
Robin Posted December 3, 2010 Share Posted December 3, 2010 An INI file? Seriously? It's not 2004 any more. Link to comment Share on other sites More sharing options...
DshWinchester Posted December 3, 2010 Share Posted December 3, 2010 nice ;Dbut why Loop in there?'-'you can subs the Ini files for a tempplayer statelikego to> Public Type TempPlayerRecabove End Type you add> BurnState as bytePutvar.. = Tempplayer(index).BurnState = 1getvar..= Tempplayer(index).burnStateyou will need timer all this chit out too(gettickcount) '-'I dont know answer this part :renzo:I think its complexy Link to comment Share on other sites More sharing options...
Helladen Posted December 3, 2010 Share Posted December 3, 2010 Yeah man only use INIs for small stuff. Not stuff used constantly, that's not very good. Link to comment Share on other sites More sharing options...
Robin Posted December 3, 2010 Share Posted December 3, 2010 @Helladen:> Yeah man only use INIs for small stuff. Not stuff used constantly, that's not very good.INIs should not be used for automated systems _at all_. Their only use should be for settings which are editable by the user, and these should be loaded once when the program starts and stored in a variable.The huge amount of INI abuse in previous versions of Eclipse can be attributed to the limiting scripting API. If you learnt how to script on old versions of Eclipse, forget everything you learnt and start fresh. Use Origins for a leaning tool, not that outdated stuff. Link to comment Share on other sites More sharing options...
Helladen Posted December 3, 2010 Share Posted December 3, 2010 XtremeWorlds all we could do is use variables. D: Link to comment Share on other sites More sharing options...
Robin Posted December 3, 2010 Share Posted December 3, 2010 Origins is open-source. Either take the time to learn it or go grab a copy of Stable. Link to comment Share on other sites More sharing options...
Helladen Posted December 3, 2010 Share Posted December 3, 2010 I don't use variables that much lol. Link to comment Share on other sites More sharing options...
Robin Posted December 3, 2010 Share Posted December 3, 2010 Either you're misusing the term 'variable' or you just admitted you don't know how to program properly. Link to comment Share on other sites More sharing options...
Helladen Posted December 3, 2010 Share Posted December 3, 2010 INIs are variables stored by the server. Link to comment Share on other sites More sharing options...
Robin Posted December 3, 2010 Share Posted December 3, 2010 @Helladen:> INIs are variables stored by the server.![](http://i38.photobucket.com/albums/e112/Kite_Minase/Reaction/1270512157593.jpg) Link to comment Share on other sites More sharing options...
viciousdead Posted December 4, 2010 Author Share Posted December 4, 2010 @Robin:> @Helladen:> > > Yeah man only use INIs for small stuff. Not stuff used constantly, that's not very good.> > INIs should not be used for automated systems _at all_. Their only use should be for settings which are editable by the user, and these should be loaded once when the program starts and stored in a variable.> > The huge amount of INI abuse in previous versions of Eclipse can be attributed to the limiting scripting API. If you learnt how to script on old versions of Eclipse, forget everything you learnt and start fresh. Use Origins for a leaning tool, not that outdated stuff.Robin I understand where your coming from, but I don't know how to store variables, period. I guess I'll google some stuff, maybe I can figure out how this shet works, someday…Guys, this script does not work, the whole point of me posting it here was to get some tips and what not...You guys spamming about .ini and w/e isn't really helping me much. :huh:@DshWinchester:> nice ;D> > but why Loop in there?'-'> you can subs the Ini files for a tempplayer state> > like> go to> > > Public Type TempPlayerRec> > above End Type you add> > > BurnState as byte> > Putvar.. = Tempplayer(index).BurnState = 1> getvar..= Tempplayer(index).burnState> > you will need timer all this chit out too(gettickcount) '-'> I dont know answer this part :renzo:> I think its complexyWhat ? I have no idea what I'm doing, I'm just copy and pasting code based on my limited knowledge… Link to comment Share on other sites More sharing options...
Robin Posted December 4, 2010 Share Posted December 4, 2010 @ShawnyBoy:> Robin I understand where your coming from, but I don't know how to store variables, period. I guess I'll google some stuff, maybe I can figure out how this shet works, someday…> > Guys, this script does not work, the whole point of me posting it here was to get some tips and what not...> You guys spamming about .ini and w/e isn't really helping me much. :huh:You haven't taken the time to learn how Origins works and yet you assume you'll be able to just prance in and write a custom spell?Before you start dicking around in the source code you need to go learn some of the basics. Link to comment Share on other sites More sharing options...
Vaughan Posted December 4, 2010 Share Posted December 4, 2010 A variable is a piece of memory with a name. It stores an object in your RAM which makes access to it very quick.An INI is a format to a file. Disk I/O is VERY slow compared to accessing a piece of memory. You should avoid disk I/O wherever possible, that's why we cache a lot of things. I think Robin caches a lot of stuff in Origins, really.As for this problem, I would advise you to do some reading if you're serious about doing this by yourself sometime. If all you're looking for is a shortcut to get this done, I might advise you recruit someone whom is familiar to do it for you. ^^ Link to comment Share on other sites More sharing options...
Helladen Posted December 4, 2010 Share Posted December 4, 2010 @Robin:> @Helladen:> > > INIs are variables stored by the server.Robin literally quit it. I know what an INI is. I don't have to give you some technical term of what it means or be exactly correct on the definition. Link to comment Share on other sites More sharing options...
viciousdead Posted December 4, 2010 Author Share Posted December 4, 2010 @Robin:> @ShawnyBoy:> > > Robin I understand where your coming from, but I don't know how to store variables, period. I guess I'll google some stuff, maybe I can figure out how this shet works, someday…> > > > Guys, this script does not work, the whole point of me posting it here was to get some tips and what not...> > You guys spamming about .ini and w/e isn't really helping me much. :huh:> > You haven't taken the time to learn how Origins works and yet you assume you'll be able to just prance in and write a custom spell?> > Before you start dicking around in the source code you need to go learn some of the basics.Dam it Robin, listen closely to what I'm saying! I KNOW THE BASICS, I've followed several online tutorials.What I can't figure out is how EO works, or much less Mirage. I don't understand a single dam thing about it…How do you, Robin, suppose I learn how EO works? :rolleyes: Link to comment Share on other sites More sharing options...
Robin Posted December 4, 2010 Share Posted December 4, 2010 @ShawnyBoy:> Dam it Robin, listen closely to what I'm saying! I KNOW THE BASICS, I've followed several online tutorials.> What I can't figure out is how EO works, or much less Mirage. I don't understand a single dam thing about it…> How do you, Robin, suppose I learn how EO works? :rolleyes:I said quite clearly that you need to learn the basics of Origins, not vb6. Link to comment Share on other sites More sharing options...
viciousdead Posted December 4, 2010 Author Share Posted December 4, 2010 @Robin:> I said quite clearly that you need to learn the basics of Origins, not vb6.How do you go about doing that? :huh: Link to comment Share on other sites More sharing options...
Yxxe Posted December 4, 2010 Share Posted December 4, 2010 @ShawnyBoy:> @Robin:> > > I said quite clearly that you need to learn the basics of Origins, not vb6.> > How do you go about doing that? :huh:Open up the source code, and look at bits that you don't understand. Try and find a few examples in the source, and see how they work. Link to comment Share on other sites More sharing options...
viciousdead Posted December 4, 2010 Author Share Posted December 4, 2010 @Lightning:> @ShawnyBoy:> > > @Robin:> > > > > I said quite clearly that you need to learn the basics of Origins, not vb6.> > > > How do you go about doing that? :huh:> > Open up the source code, and look at bits that you don't understand. Try and find a few examples in the source, and see how they work.Ok, I guess I'll look around at TempPlayer… o :huh: Link to comment Share on other sites More sharing options...
viciousdead Posted December 4, 2010 Author Share Posted December 4, 2010 Ok, I got a burn state working, only thing is it damages healh 1 time per full duration(Duration = say 10 secs, after 10scs or whatever they get 1 dmg…)Here is the code:>! ``` ' if burnned, damage health If TempPlayer(index).BurnDuration > 0 Then Call SetPlayerVital(index, Vitals.HP, GetPlayerVital(index, Vitals.HP) - 10) Exit Sub End If```How do I make it repeat, like every 2 seconds or w/e? Link to comment Share on other sites More sharing options...
Yxxe Posted December 4, 2010 Share Posted December 4, 2010 Modify your sub to this:```Sub BurnPlayer(ByVal Index As Long) ' if burnned, damage health Call SetPlayerVital(index, Vitals.HP, GetPlayerVital(index, Vitals.HP) - 10) BurnTick = GetTickCount + 10000 Exit SubEnd Sub```Declare a Global Variable BurnTick:```Public BurnTick As Long```Under this in modGameLogic:```' check if trade timed out If TradeRequest Then If TradeTimer < Tick Then AddText "You took too long to decide. Please try again.", BrightRed TradeRequest = False TradeTimer = 0 End If End If```Add this:```If TempPlayer(index).BurnDuration > 0 Then If GetTickCount > BurnTick Then Call BurnPlayer(Index) End IfEnd If```You might also want to check whether the player dies from the burn too. Link to comment Share on other sites More sharing options...
DshWinchester Posted December 4, 2010 Share Posted December 4, 2010 @Lightning:> Modify your sub to this:> > ```> Sub BurnPlayer(ByVal Index As Long)> ' if burnned, damage health> Call SetPlayerVital(index, Vitals.HP, GetPlayerVital(index, Vitals.HP) - 10)> BurnTick = GetTickCount + 10000> Exit Sub> End Sub> ```> Declare a Global Variable BurnTick:> > ```> Public BurnTick As Long> ```> Under this in modGameLogic:> > ```> ' check if trade timed out> If TradeRequest Then> If TradeTimer < Tick Then> AddText "You took too long to decide. Please try again.", BrightRed> TradeRequest = False> TradeTimer = 0> End If> End If> ```> Add this:> ```> If TempPlayer(index).BurnDuration > 0 Then> If GetTickCount > BurnTick Then> Call BurnPlayer(Index)> End If> End If> ```> You might also want to check whether the player dies from the burn too.you need set the BurnTick to 0 right?Or on "Gettickcount = gettickcount + 10000" already set?'-'like gettickcount = 0 + 10 secthis too> If TempPlayer(index).BurnDuration > 0 Then> If GetTickCount > BurnTick Then> Call BurnPlayer(Index)> **TempPlayer(index).BurnDuration = 0**> End If> End Ifright? :huh:ty for the code Link to comment Share on other sites More sharing options...
viciousdead Posted December 4, 2010 Author Share Posted December 4, 2010 Dear jesus people, I said here was the code, I wasn't refering to the whole thing, I've got it working, I just need to make the server dmg the player every 2 seconds..I didn't read your long code yet, I will after this posts.. :oEDIT: I didn't make that a sub… I placed it in another sub, lol. Thats why theres a random End If at the bottm of the code. Ugh, If your sub will tick down dmg, then I'll use it, mine only dmg's one time.. :o Oh, and I never thought of looking at trade for an example. XDI like your version better except for the tick + 10000, I made a scroll bar for that one. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now