Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Broken_Paladin

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Broken_Paladin's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. http://aruljohn.com/info/howtofindipaddress/ Trace him :)
  2. I'm using 2.7 and able to buff myself, trying to get the target buff/debuff to work to no avail. (Case 3 spell) Any suggestions or fixes I would appreciate, if the targeting won't work what would you suggest to make it AOE. ``` ' Executes whenever a player casts a scripted spell. Sub ScriptedSpell(Index, Script) Select Case Script Case 0 Call PlayerMsg(Index, "This scripted spell has no apparent use.", WHITE) Exit Sub Case 1 Call PlayerMsg(Index, "Test 1.", WHITE) Exit Sub Case 2 call StartRipple(index, 5, 5, 2, 75) Exit sub Case 3 If GetPlayerTarget(index) > 0 Then Dim addblah Dim playermag playermag = GetPlayerMAGI(index) / 2 b = (int(playermag)) Call StatBoost(index, 0, b, b, 0, 5) End If End Select Exit Sub ``` ``` Sub StatBoost(index, str, def, spd, mag, time) dim inuse dim playerstr dim playerdef dim playerspd dim playermag inuse = GetVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "StatBoost", "using") playerstr = GetPlayerSTR(index) playerdef = GetPlayerDEF(index) playerspd = GetPlayerSPEED(index) playermag = GetPlayerMAGI(index) if inuse = "" then if int(str) > 0 then Call BattleMsg(index, "Your strength has been boosted by " & str, 14, 1) end if if int(def) > 0 then Call BattleMsg(index, "Your defense has been boosted by " & def, 14, 1) end if if int(spd) > 0 then Call BattleMsg(index, "Your speed has been boosted by " & spd, 14, 1) end if if int(mag) > 0 then Call BattleMsg(index, "Your magic has been boosted by " & mag, 14, 1) end if Call PutVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "StatBoost", "using", 1) Call PutVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "StatBoost", "str", "" & str) Call PutVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "StatBoost", "def", "" & def) Call PutVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "StatBoost", "spd", "" & spd) Call PutVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "StatBoost", "mag", "" & mag) Call SetPlayerSTR(index, int(playerstr) + int(str)) Call SetPlayerDEF(index, int(playerdef) + int(def)) Call SetPlayerSPEED(index, int(playerspd) + int(spd)) Call SetPlayerMagi(index, int(playermag) + int(mag)) Call SendStats(index) Call SetTimer("StatRelease " & index & "," & str & "," & def & "," & spd & "," & mag, int(time * 1000)) else Call PlayerMsg(index, "You're already boosted!", 15) end if end sub Sub StatRelease(index, str, def, spd, mag) dim inuse dim playerstr dim playerdef dim playerspd dim playermag inuse = GetVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "StatBoost", "using") playerstr = GetPlayerSTR(index) playerdef = GetPlayerDEF(index) playerspd = GetPlayerSPEED(index) playermag = GetPlayerMAGI(index) if inuse = "1" then Call BattleMsg(index, "The effects of you ability increase has worn off.", 4, 1) Call PutVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "StatBoost", "using", "") Call SetPlayerSTR(index, int(playerstr) - int(str)) Call SetPlayerDEF(index, int(playerdef) - int(def)) Call SetPlayerSPEED(index, int(playerspd) - int(spd)) Call SetPlayerMagi(index, int(playermag) - int(mag)) Call SendStats(index) Call RemoveTimer("StatRelease " & index & "," & str & "," & def & "," & spd & "," & mag) else Call PlayerMsg(index, "You're not boosted!", 15) end if end sub ```
  3. Make sure the npc has stats, that could be preventing it from working.
  4. Thankyou dg I'll give it a try, I missed that when i was going through the forum. I see what I did wrong thank you for all your help, got it working.
  5. I'm trying to create a scripted AOE spell that plays an animation on all the targets in a few square range and plays a sound. However I tried writing this up but I don't think I did something right, any pointers or suggestions. ``` Dim Target Dim npcnum Sub ScriptedSpell(Index, Script) Select Case Script Case 0 npcnum = GetPlayerTargetNPC(Index) Call PlaySound(index, "spell1.wav") If Int(Damage) > 0 Then If Int(GetPlayerTarget(Index)) > 0 Then Target = GetPlayerTarget(Index) Call DamagePlayer(Index, Target, Damage) Else Target = GetPlayerTargetNPC(Index) Call DamageNPC(Index, Target, Damage) End If Exit Sub Case Else Call PlayerMsg(Index, "No spell script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End Select End Sub ``` I'm trying to find the function I think to do AOE foes, AOE allies, self. Is what im not getting a good grasp on.
  6. Broken_Paladin

    Need Help

    This is my code in 2.7 and it works fine, hope it helps. ``` ' Executes when a player steps onto a scripted tile. Sub ScriptedTile(Index, Script) Select Case Script Case 0 Call PlayerMsg(Index, "You stare off into the distance and see moutains on the horizon. You realize your journey has only begun.", WHITE) Call PlaySound(index, "main.mid") Exit Sub Case Else Call PlayerMsg(Index, "No tile script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End Select End Sub ```
  7. Try under behavior you have to change it from whatever it is on (attack on sight, friendly, friendly,shopkeeper,guard) to Scripted. Make sure your npc has stats and hitpoints. Basically script 0 is calling for case 0 in your main, script 1 is calling for case 1,etc. I recently had a similiar problem as well.
  8. Thank you again Riney, however when i type /editmain or /editmaineditor it disconnects me back to the login screen. I sent you private mssg with the server I.P. I really appreciate all your help. The issue was resolved and I appreciate Riney for all his help in my endeavor.
  9. Call playermsg(index, GetVar("Words.ini", "Words", "param & Words"), 14) Changed it to that and still blank text. Sorry we missed each other on that one ^_^
  10. Thank you Riney for helping, I changed it and reloaded the scripts on the server but am still getting the blank text. This is in my main ``` Sub ScriptedNPC(Index, Script) Select Case Script Case 0 Call PlayerMsg(Index, "NPC: Hi I'm a scripted NPC", YELLOW) Case 1 Dim Words Words=Rand(100,1) Call playermsg(index, GetVar("Words.ini", "Words", "param" & Words), 14) Case Else Call PlayerMsg(Index, "NPC: I dont have a script yet >:(", YELLOW) End Select Exit Sub End Sub ``` This is my Words.ini that is located in both the scripts folder as well as I put it in the directory with server.exe ``` [Words] param1=Hello param2=Go away! param3=*Crys* param4=A param5=B param6=C param7=D param8=E param9=F param10=G param11=H param12=J param13=K param14=L param15=M param16=N param17=O param18=P param19=Q param20=R param21=S param22=T param23=U param24=V param25=X param26=Y param27=Z param28=AA param29=BB param30=CC param31=DD param32=EE param33=FF param34=GG param35=HH param36=II param37=JJ param38=f param39=ffff param40=ff param41=fff param42=fff param43=ff param44=ff param45=fff param46=ddsdssd param47=sdfddsf param48=sddssd param49=fggfd param50=gfg param51=dag param52=dag param53=fdgf param54=gf param55=gfdh param56=retre param57=erret param58=reret param59=jjjj param60=reret param61=etr param62=erter param63=ertre param64=ret param65=ertre param66=retre param67=retert param68=reter param69=retret param70=ertr param71=reer param72=ert param73=ertre param74=retert param75=retre param76=erte param77=ertre param78=erter param79=erter param80=erter param81=ertr param82=ertre param83=erter param84=ff param85=ertre param86=sdrf param87=sdes param88=dsfg param89=fg param90=erw param91=fgd param92=dsf param93=ewr param94=sd param95=sdr param96=e param97=dsf param98=ewr param99=rewr param100=sdfsdf ```
  11. I have the .ini in botht he script and folder with the server.exe. I have written all 100 replies. My Words.ini looks like this [section1] param1= dsfsd param2= dsf param3= dsfds param4= A param5= B param6= C param7= D param8= E param9= F I just wrote up a scripted tile and placed it and it works fine.
  12. Okay case 0 works fine now, when i try to run case 1 it just makes the guy spawn blank text instead of pulling a random word from a text document. Any suggestions? ``` Sub ScriptedNPC(Index, Script) Select Case Script Case 0 Call PlayerMsg(Index, "NPC: Hi I'm a scripted NPC", YELLOW) Case 1 Dim Words Words=Rand(100,1) Call playermsg(index, GetVar("Words.ini", "Words", ""& Words &""), 14) Case Else Call PlayerMsg(Index, "NPC: I dont have a script yet >:(", YELLOW) End Select Exit Sub End Sub ``` Looking at it further it doesn't seem to be A) locating the .ini and thus setting the variable to nothing is why blank text appears or B) I have something setup wrong when it tries searching for it.
  13. Thank you Askelj the end sub fixed it. Thank you as well Riney.
  14. I have a npc that has atleast 10 in every stat as well as works when I have him as a friendly that talks. The trouble is when I set him as scripted and call either script 0 or script 1 neither of them works. Im using 2.7, any suggestions on what I did wrong? This is my main. ``` Sub ScriptedNPC(Index, Script) Select Case Script Case 0 Call PlayerMsg(Index, "NPC: Hi I'm a scripted NPC", YELLOW) Case 1 Dim Words Words=Rand(100,1) Call playermsg(index, GetVar("Words.ini", "Words", ""& Words &""), 14) Case Else Call PlayerMsg(Index, "NPC: I dont have a script yet >:(", YELLOW) End Select Exit Sub ```
×
×
  • Create New...