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

Me be a scripter =D


Sting
 Share

Recommended Posts

me be a scripter all games ive tryed to make i always get side tracked (cuz i hate mapping) soooo here i am looking for a job scripting anything you ask for want examples of my scripts? here ill just post the file that i put all my scripts on that i make (so i can re-use them in other games if needed lol)

```
'None-Start---------------------------------------------------------------------------
'None-End-----------------------------------------------------------------------------

'Scan-Start---------------------------------------------------------------------------
dim tar
tar = getplayertarget(index)
if getplayermap(index) = getplayermap(tar) then
call playermsg(index, " " & getplayername(tar) " is level " & getplayerlevel(tar) & " has " & getplayerstr(tar) & "Str " & getplayerdef(tar) & "Def " &  getplayerhp(tar) & "Hp and " & getplayermp(tar) & Mp!" 5)
else
call playermsg(index, "your target is not on the same map", 5)
end if
'Scan-End-----------------------------------------------------------------------------

'Self Replace-Start-------------------------------------------------------------------
dim target
target = getplayertarget(index)
if getplayermap(index) = getplayermap(target) then
call playerwarp(index, getplayermap(target), getplayerx(target), getplayery(target))
call playerwarp(target, getplayermap(index), getplayerx(index), getplayery(index))
else
call playermsg(index, "your target isnt on the same map as you.", 5)
end if
'Self Replace-End---------------------------------------------------------------------

'Self Heal-Start----------------------------------------------------------------------

call settile(getvar("spell.ini", getplayername(index), "map"), getvar("spell.ini", getplayername(index), "x"), getvar("spell.ini", getplayername(index), "y"), 0, 0, 0, 8) 
call settile(getplayermap(index), getplayerx(index), getplayery(index) - 3, 7, 1, 5, 8) 
call putvar("spell.ini", getplayername(index), "x", getplayerx(index))
call putvar("spell.ini", getplayername(index), "y", getplayery(index))
call putvar("spell.ini", getplayername(index), "map", getplayermap(index))
call setplayerhp(index, getplayerhp(index) + getplayerlevel(index))

'Self Heal-End------------------------------------------------------------------------

'Ice Blast-Start----------------------------------------------------------------------
case 1
    dim i
Dim aa
Dim ab
Dim ac
Dim ad
ad = GetPlayerClass(index)
aa = GetVar("Classes\Class" & ad & ".ini", "CLASS", "Map")
ab = GetVar("Classes\Class" & ad & ".ini", "CLASS", "y")
ac = GetVar("Classes\Class" & ad & ".ini", "CLASS", "x")
    i = 1
call settile(getvar("spell.ini", getplayername(index), "map"), getvar("spell.ini", getplayername(index), "x"), getvar("spell.ini", getplayername(index), "y"), 0, 0, 0, 8)
    select case getplayerdir(index)
    case 0
if getplayery(index) - 3 >= 0 then
call settile(getplayermap(index), getplayerx(index), getplayery(index) - 3, 7, 1, 5, 8)   
call putvar("spell.ini", getplayername(index), "x", getplayerx(index))
call putvar("spell.ini", getplayername(index), "y", getplayery(index) - 3)
call putvar("spell.ini", getplayername(index), "map", getplayermap(index))
Call settimer("tmrtest " & index & "," & 0, 200)
do while i <= GetVar("data.ini", "max", "MAX_PLAYERS")
if getplayermap(i) = getplayermap(index) then
if getplayerx(i) = getplayerx(index) then
if getplayery(i) = getplayery(index) - 3 then
if getplayerhp(i) > 5 then
call playermsg(index, "hit", 4)
call setplayerhp(i, getplayerhp(i) - 5)
call sendhp(i)
else
Call PlayerWarp(i, aa, ab, ac)
call Globalmsg(getplayername(i) & " Has been killed by " & getplayername(index), 5)
end if
end if
end if
end if
    i = i + 1
loop
end if
    case 1
if getplayery(index) + 3 <= 14 then
    call settile(getplayermap(index), getplayerx(index), getplayery(index) + 3, 7, 1, 5, 8)   
call putvar("spell.ini", getplayername(index), "x", getplayerx(index))
call putvar("spell.ini", getplayername(index), "y", getplayery(index) + 3)
call putvar("spell.ini", getplayername(index), "map", getplayermap(index))
Call settimer("tmrtest " & index & "," & 0, 200)
do while i <= GetVar("data.ini", "max", "MAX_PLAYERS")
if getplayermap(i) = getplayermap(index) then
if getplayerx(i) = getplayerx(index) then
if getplayery(i) = getplayery(index) + 3 then
if getplayerhp(i) > 5 then
call setplayerhp(i, getplayerhp(i) - 5)
call sendhp(i)               
call playermsg(index, "hit", 4)
else
Call PlayerWarp(i, aa, ab, ac)
call Globalmsg(getplayername(i) & " Has been killed by " & getplayername(index), 5)
end if
end if
end if
end if
    i = i + 1
loop
end if
    case 2
if getplayerx(index) - 3 >= 0 then
    call settile(getplayermap(index), getplayerx(index) - 3, getplayery(index), 7, 1, 5, 8)   
call putvar("spell.ini", getplayername(index), "x", getplayerx(index) - 3)
call putvar("spell.ini", getplayername(index), "y", getplayery(index))
call putvar("spell.ini", getplayername(index), "map", getplayermap(index))
Call settimer("tmrtest " & index & "," & 0, 200)
do while i <= GetVar("data.ini", "max", "MAX_PLAYERS")
if getplayermap(i) = getplayermap(index) then
if getplayerx(i) = getplayerx(index) - 3 then
if getplayery(i) = getplayery(index) then
if getplayerhp(i) > 5 then
call setplayerhp(i, getplayerhp(i) - 5)
call sendhp(i)               
call playermsg(index, "hit", 4)
else
Call PlayerWarp(i, aa, ab, ac)
call Globalmsg(getplayername(i) & " Has been killed by " & getplayername(index), 5)
end if
end if
end if
end if
    i = i + 1
loop
end if
    case 3
if getplayery(index) + 3 <= 19 then
    call settile(getplayermap(index), getplayerx(index) + 3, getplayery(index), 7, 1, 5, 8)   
call putvar("spell.ini", getplayername(index), "x", getplayerx(index) + 3)
call putvar("spell.ini", getplayername(index), "y", getplayery(index))
call putvar("spell.ini", getplayername(index), "map", getplayermap(index))
Call settimer("tmrtest " & index & "," & 0, 200)
do while i <= GetVar("data.ini", "max", "MAX_PLAYERS")
if getplayermap(i) = getplayermap(index) then
if getplayerx(i) = getplayerx(index) + 3 then
if getplayery(i) = getplayery(index) then
if getplayerhp(i) > 5 then
call setplayerhp(i, getplayerhp(i) - 5)     
call playermsg(index, "hit", 4)
call sendhp(i)
else
Call PlayerWarp(i, aa, ab, ac)
call Globalmsg(getplayername(i) & " Has been killed by " & getplayername(index), 5)
end if
end if
end if
end if
    i = i + 1
loop                   
end if
    end select
    exit sub
'Ice Blast-End---------------------------------------------------------------------

'DEATH MATCH GAME!!!---------------------------------------------------------------
'commands
case "/creategame"
if getplayeraccess(index) > 0 then
call playermsg(index,"games are being reset", 5)
call putvar("game.ini", "deathmatch", "host", "none")
call putvar("game.ini", "deathmatch", "voteyes", 0)
call putvar("game.ini", "deathmatch", "voteno", 0)
call putvar("game.ini", "deathmatch", "vote", 0)
call putvar("game.ini", "deathmatch", "votename", "none")
call putvar("game.ini", "deathmatch", "players", 0)
call putvar("game.ini", "deathmatch", "playersleft", 0)
call putvar("game.ini", "deathmatch", "reward", 1)
call putvar("game.ini", "deathmatch", "rewardamount", 100)
call playermsg(index, "game stats created", 5)
end if
exit sub

case "/resetgames"
if getplayeraccess(index) > 0 then
call playermsg(index,"games are being reset", 5)
call putvar("game.ini", "deathmatch", "host", "none")
call putvar("game.ini", "deathmatch", "voteyes", 0)
call putvar("game.ini", "deathmatch", "voteno", 0)
call putvar("game.ini", "deathmatch", "vote", 0)
call putvar("game.ini", "deathmatch", "votename", "none")
call putvar("game.ini", "deathmatch", "players", 0)
call putvar("game.ini", "deathmatch", "playersleft", 0)
call playermsg(index,"games have been reset", 5)
else
call playermsg(index,"you must be a admin to use this command",5)
end if
exit sub

case "/deathmatchhostkick"
if getvar("game.ini", "deathmatch", "vote") <> 1 then
call globalmsg(getplayername(index) & "Would like to change the deathmatch host please vote now with /deathmatchyes or /deathmatchno", 1)
call playermsg(index, "warning if reported that you are abusing this command you will be ban", 5)
call putvar("game.ini", "deathmatch", "vote", 1)
call putvar("game.ini", "deathmatch", "votename", getplayername(index))
else
call playermsg(index, "A vote for that is already going on", 5)
end if
exit sub

case "/deathmatchyes"
if getvar("game.ini", "deathmatch", "vote") = 1 then
call putvar("game.ini", "deathmatch", "voteyes", getvar("game.ini", "deathmatch", "voteyes") + 1)
call playermsg(index, "you have voted yes to change the deathmatch host!", 5)
call playermsg(index, "if reported voting more then once you will be ban", 5)
call globalmsg(getplayername(index) & " has voted yes!", 3)
else
call playermsg(index, "a vote to change deathmatch host isnt going on to start one type /deathmatchhostkick", 5)
end if
exit sub

case "/deathmatchno"
if getvar("game.ini", "deathmatch", "vote") = 1 then
call putvar("game.ini", "deathmatch", "voteno", getvar("game.ini", "deathmatch", "voteno") + 1)
call playermsg(index, "you have voted yes to change the deathmatch host!", 5)
call playermsg(index, "if reported voting more then once you will be ban", 5)
call globalmsg(getplayername(index) & " has voted no!", 3)
else
call playermsg(index, "a vote to change deathmatch host isnt going on to start one type /deathmatchhostkick", 5)
end if
exit sub

case "/deathmatchvotefinish"
if getvar("game.ini", "deathmatch", "votename") = getplayername(index) then
call globalmsg("Deathmatch host kick votes have ended!", 5)
call putvar("game.ini", "deathmatch", "vote", 0)
if getvar("game.ini", "deathmatch", "voteyes") > getvar("game.ini", "deathmatch", "voteno") then
call globalmsg("Deathmatch Host has been removed", 5)
call putvar("game.ini", "deathmatch", "host", "none")
else
call globalmsg("Vote was rejected", 5)
end if
call putvar("game.ini", "deathmatch", "voteyes", 0)
call putvar("game.ini", "deathmatch", "voteno", 0)
end if
exit sub

Case "/deathmatchstart"
dim z
dim p
p = 0
z = 0
If getvar("game.ini", "deathmatch", "host") = getplayername(index) Then
Call globalmsg("deathmatch is starting", 5)
Do While z < getvar("Data.ini", "MAX", "MAX_PLAYERS") + 1
call playermsg(index, p & "% Done", 5)
p = p + 2
If getplayermap(z) = 2 Then
Call putvar("game.ini", "deathmatch", "players", getvar("game.ini", "deathmatch", "players") + 1)
call playermsg(z, "Warping to Deathmatch room", 5)
Call playerwarp(z, 5, 9, 6)
End If
  z = z + 1
Loop
call globalmsg("Deathmatch Start Warps have finished", 6) 
End If
Exit Sub

case "/gamehelp"
call playermsg(index, "type /deathmatchhelp for help with deathmatch and /ctfhelp for help with ctf", 4)
exit sub

case "/deathmatchhelp"
call playermsg(index, "---HOST COMMANDS---", 4)
call playermsg(index, "/deathmatchstart: Start DM", 4)
call playermsg(index, "---ALL COMMANDS---", 4)
call playermsg(index, "/deathmatchhostkick: Start a vote to change host", 4)
call playermsg(index, "/deathmatchvotefinish: Finish Vote if you started it", 4)
call playermsg(index, "/deathmatchyes: vote yes if deathmatch host change vote is started", 4)
call playermsg(index, "/deathmatchno: vote no if deathmatch host change vote is started", 4)
call playermsg(index, "/deathmatchwin: if you won deathmatch type this to get reward", 4)
exit sub

case "/deathmatchwin"
dim slot
if getplayermap(index) = 5 then
call putvar("game.ini", "deathmatch", "playersleft", 0)
slot = 1
z = 0
Do While z < getvar("Data.ini", "MAX", "MAX_PLAYERS") + 1
if getplayermap(z) = 5 then
call putvar("game.ini", "deathmatch", "playersleft", getvar("game.ini", "deathmatch", "playersleft") + 1)
end if
  z = z + 1
Loop

if getvar("game.ini", "deathmatch", "playersleft") - 1 < 2 then
call globalmsg(getplayername(index) & " has won the deathmatch!", 8)
call playerwarp(index, 2, 14, 14)
do while slot < 25
if getPlayerInvItemNum(index, slot, 0) then
call setplayerinvitemnum(index, slot, getvar("game.ini", "deathmatch", "reward"))
call setplaryinvitemvalue(index, slot, getvar("game.ini", "deathmatch", "rewardamount"))
call sendinventoryupdate(index, slot)
slot = 24
end if
slot = slot + 1
loop
else
call playermsg(index, "you havnt won there are still " & getvar("game.ini", "deathmatch", "playersleft") - 1 & " players left (including you)", 4)
end if
else
call playermsg(index, "you are not in a deathmatch!", 5)
end if
exit sub
'commands end -----
'tile
    Case 0
if getvar("game.ini", "deathmatch", "host") = getplayername(index) then
call playermsg(index, "You are no longer the deathmatch host", 5)
call globalmsg(getplayername(index) & " is no longer the deathmatch host", 2)
call putvaR("game.ini", "deathmatch", "host", "none")
else
if getvar("game.ini", "deathmatch", "host") = "none" then
call putvar("game.ini", "deathmatch", "host", getplayername(index))
call playermsg(index, "You are now the deathmatch host", 5)
call globalmsg(getplayername(index) & " is now the deathmatch host", 2)
else
call playermsg(index, "The deathmatch host is " & getvar("game.ini", "deathmatch", "host"), 5)
end if
end if
'tile end
'DEATH MATCH GAME END-------------------------------------------------------------------

Sub ScriptedSpell(index, Script)
Select Case Script
'heal-Start--------------------------------------------------------------------------
    Case 0
      if getplayerhp(index) + getplayermp(index) > getplayermaxhp(index) then
call setplayerhp(index, getplayermaxhp(index))

call playerwarp(index, getplayermap(index), getplayerx(index), Getplayery(index))
call playermsg(index, "you have been healed fully", 5)
else
call setplayerhp(index, getplayerhp(indeX) + getplayermp(index))

call playerwarp(index, getplayermap(index), getplayerx(index), Getplayery(index))
call playermsg(index, "Healed for " & getplayermp(index), 5)
end if
  call setplayermp(index, 0)
exit sub
'Heal-End-----------------------------------------------------------------------------

'Set Tree-Start-----------------------------------------------------------------------
case 1

if getplayermp(index) > 20 then
if getAttribute(getplayermap(index),getplayerx(index),getplayery(index)) = 0 then
call settile(getvar("spell.ini", getplayername(index), "treemap"),getvar("spell.ini", getplayername(index), "treex"),getvar("spell.ini", getplayername(index), "treey"), 0,0,0,8)
call settile(getvar("spell.ini", getplayername(index), "treemap"),getvar("spell.ini", getplayername(index), "treex"),getvar("spell.ini", getplayername(index), "treey"), 0,0,0,0, "", "", "")
Call SetAttribute(getplayermap(index),getplayerx(index),getplayery(index),1,0,0,0,"","","")
call settile(getplayermap(index), getplayerx(index), getplayery(index), 2, 6, 0, 8) 
call putvar("spell.ini", getplayername(index), "treemap", getplayermap(index))
call putvar("spell.ini", getplayername(index), "treex", getplayerx(index))
call putvar("spell.ini", getplayername(index), "treey", getplayery(index))
call setplayermp(index, getplayermp(index) - 20)
else
call playermsg(index, "You cannot set a bush here", 5)
end if
else
call playermsg(index, "you do not have enough mana to do this (20 mana)", 5)
end if
exit sub
'Set Tree-End-------------------------------------------------------------------------

'Set Heal Pool-start------------------------------------------------------------------
case 2
if getplayermp(index) > 20 then
if getAttribute(getplayermap(index),getplayerx(index),getplayery(index)) = 0 then
Call SetAttribute(getplayermap(index),getplayerx(index),getplayery(index),7,0,0,0,"","","")
call settile(getplayermap(index), getplayerx(index), getplayery(index), 3, 10, 1, 8) 
call setattribute(getvar("spell.ini", getplayername(index), "healmap"),getvar("spell.ini", getplayername(index), "healx"),getvar("spell.ini", getplayername(index), "healy"), 0,0,0,0,"","","")
call settile(getvar("spell.ini", getplayername(index), "healmap"),getvar("spell.ini", getplayername(index), "healx"),getvar("spell.ini", getplayername(index), "healy"), 0,0,0,8)
call putvar("spell.ini", getplayername(index), "healmap", getplayermap(index))
call putvar("spell.ini", getplayername(index), "healx", getplayerx(index))
call putvar("spell.ini", getplayername(index), "healy", getplayery(index))
call setplayermp(index, getplayermp(index) - 20)
else
call playermsg(index, "You cannot set a heal pool here", 5)
end if
else
call playermsg(index, "you do not have enough mana to do this (20 mana)", 5)
end if
exit sub
'set heal pool-end--------------------------------------------------------------------

'remove bush-start--------------------------------------------------------------------
  case 3
    select case getplayerdir(index)
    case 0
if getplayery(index) - 1 >= 0 then
if gettilex(getplayermap(index), getplayerx(index), getplayery(index) - 1, 8) = 2 then
if gettiley(getplayermap(index), getplayerx(index), getplayery(index) - 1, 8) = 6 then
if gettileset(getplayermap(index), getplayerx(index), getplayery(index) - 1, 8) = 0 then
Call SetAttribute(getplayermap(index),getplayerx(index),getplayery(index) - 1,0,0,0,0,"","","")
call settile(getplayermap(index), getplayerx(index), getplayery(index) - 1, 0, 0, 0, 8) 
else
call playermsg(index, "that is not a bush", 5)
end if
else
call playermsg(index, "that is not a bush", 5)
end if
else
call playermsg(index, "that is not a bush", 5)
end if
end if
    case 1
if getplayery(index) + 1 <= 14 then
if gettilex(getplayermap(index), getplayerx(index), getplayery(index) + 1, 8) = 2 then
if gettiley(getplayermap(index), getplayerx(index), getplayery(index) + 1, 8) = 6 then
if gettileset(getplayermap(index), getplayerx(index), getplayery(index) + 1, 8) = 0 then
Call SetAttribute(getplayermap(index),getplayerx(index),getplayery(index) + 1,0,0,0,0,"","","")
call settile(getplayermap(index), getplayerx(index), getplayery(index) + 1, 0, 0, 0, 8) 
else
call playermsg(index, "that is not a bush", 5)
end if
else
call playermsg(index, "that is not a bush", 5)
end if
else
call playermsg(index, "that is not a bush", 5)
end if
end if
    case 2
'if getplayerx(index) - 1 > -1
if gettilex(getplayermap(index), getplayerx(index) - 1, getplayery(index), 8) = 2 then
if gettiley(getplayermap(index), getplayerx(index) - 1, getplayery(index), 8) = 6 then
if gettileset(getplayermap(index), getplayerx(index) - 1, getplayery(index), 8) = 0 then
Call SetAttribute(getplayermap(index),getplayerx(index) - 1,getplayery(index),0,0,0,0,"","","")
call settile(getplayermap(index), getplayerx(index) - 1, getplayery(index), 0, 0, 0, 8) 
else
call playermsg(index, "that is not a bush", 5)
end if
else
call playermsg(index, "that is not a bush", 5)
end if
else
call playermsg(index, "that is not a bush", 5)
end if
'end if
    case 3
'if getplayerx(index) + 1 <= 19
if gettilex(getplayermap(index), getplayerx(index) + 1, getplayery(index), 8) = 2 then
if gettiley(getplayermap(index), getplayerx(index) + 1, getplayery(index), 8) = 6 then
if gettileset(getplayermap(index), getplayerx(index) + 1, getplayery(index), 8) = 0 then
Call SetAttribute(getplayermap(index),getplayerx(index) + 1,getplayery(index),0,0,0,0,"","","")
call settile(getplayermap(index), getplayerx(index) + 1, getplayery(index), 0, 0, 0, 8) 
else
call playermsg(index, "that is not a bush", 5)
end if
else
call playermsg(index, "that is not a bush", 5)
end if
else
call playermsg(index, "that is not a bush", 5)
end if
'end if
    end select
    exit sub
'remove bush-end---------------------------------------------------------------------

'remove healing pool-start-----------------------------------------------------------
  case 4
    select case getplayerdir(index)
    case 0
'if getplayery(index) - 1 >= 0 then
if gettilex(getplayermap(index), getplayerx(index), getplayery(index) - 1, 8) = 3 then
if gettiley(getplayermap(index), getplayerx(index), getplayery(index) - 1, 8) = 10 then
if gettileset(getplayermap(index), getplayerx(index), getplayery(index) - 1, 8) = 1 then
Call SetAttribute(getplayermap(index),getplayerx(index),getplayery(index) - 1,0,0,0,0,"","","")
call settile(getplayermap(index), getplayerx(index), getplayery(index) - 1, 0, 0, 0, 8) 
else
call playermsg(index, "that is not a healing pool", 5)
end if
else
call playermsg(index, "that is not a healing pool", 5)
end if
else
call playermsg(index, "that is not a healing pool", 5)
end if
'end if
    case 1
'if getplayery(index) + 1 <= 14 then
if gettilex(getplayermap(index), getplayerx(index), getplayery(index) + 1, 8) = 3 then
if gettiley(getplayermap(index), getplayerx(index), getplayery(index) + 1, 8) = 10 then
if gettileset(getplayermap(index), getplayerx(index), getplayery(index) + 1, 8) = 1 then
Call SetAttribute(getplayermap(index),getplayerx(index),getplayery(index) + 1,0,0,0,0,"","","")
call settile(getplayermap(index), getplayerx(index), getplayery(index) + 1, 0, 0, 0, 8) 
else
call playermsg(index, "that is not a healing pool", 5)
end if
else
call playermsg(index, "that is not a healing pool", 5)
end if
else
call playermsg(index, "that is not a healing pool", 5)
end if
'end if
    case 2
'if getplayerx(index) - 1 > -1
if gettilex(getplayermap(index), getplayerx(index) - 1, getplayery(index), 8) = 3 then
if gettiley(getplayermap(index), getplayerx(index) - 1, getplayery(index), 8) = 10 then
if gettileset(getplayermap(index), getplayerx(index) - 1, getplayery(index), 8) = 1 then
Call SetAttribute(getplayermap(index),getplayerx(index) - 1,getplayery(index),0,0,0,0,"","","")
call settile(getplayermap(index), getplayerx(index) - 1, getplayery(index), 0, 0, 0, 8) 
else
call playermsg(index, "that is not a healing pool", 5)
end if
else
call playermsg(index, "that is not a healing pool", 5)
end if
else
call playermsg(index, "that is not a healing pool", 5)
end if
'end if
    case 3
'if getplayerx(index) + 1 <= 19
if gettilex(getplayermap(index), getplayerx(index) + 1, getplayery(index), 8) = 3 then
if gettiley(getplayermap(index), getplayerx(index) + 1, getplayery(index), 8) = 10 then
if gettileset(getplayermap(index), getplayerx(index) + 1, getplayery(index), 8) = 1 then
Call SetAttribute(getplayermap(index),getplayerx(index) + 1,getplayery(index),0,0,0,0,"","","")
call settile(getplayermap(index), getplayerx(index) + 1, getplayery(index), 0, 0, 0, 8) 
else
call playermsg(index, "that is not a healing pool", 5)
end if
else
call playermsg(index, "that is not a healing pool", 5)
end if
else
call playermsg(index, "that is not a healing pool", 5)
end if
'end if
    end select
    exit sub
'remove healing pool-end-------------------------------------------------------------

'heal other-start--------------------------------------------------------------------
    Case 5
dim target
target = getplayertarget(index)
      if getplayermp(index) / 2 + getplayerhp(target) > getplayermaxhp(target) then
call setplayerhp(target, getplayermaxhp(target))

'call playerwarp(target, getplayermap(target), getplayerx(target), Getplayery(target))
call playermsg(target, "you have been healed fully", 5)
else
call setplayerhp(target, getplayermp(index) / 2 + getplayerhp(target))

'call playerwarp(target, getplayermap(target), getplayerx(target), Getplayery(target))
call playermsg(target, "Healed for " & getplayermp(index) / 2, 5)
end if
  call setplayermp(index, 0)
exit sub
'heal other-end----------------------------------------------------------------------

'blast-start-------------------------------------------------------------------------
  case 6
    dim i
    i = 1
call settile(getvar("spell.ini", getplayername(index), "map"),getvar("spell.ini", getplayername(index), "x"),getvar("spell.ini", getplayername(index), "y"),0,0,0,8)
    select case getplayerdir(index)
    case 0
if getplayery(index) - 3 >= 0 then
call settile(getplayermap(index), getplayerx(index), getplayery(index) - 3, 5, 26, 0, 8)   
call putvar("spell.ini", getplayername(index), "x", getplayerx(index))
call putvar("spell.ini", getplayername(index), "y", getplayery(index) - 3)
call putvar("spell.ini", getplayername(index), "map", getplayermap(index))
Call settimer("tmrtest " & index & "," & 0, 200)
do while i <= GetVar("data.ini", "max", "MAX_PLAYERS")
if getplayermap(i) = getplayermap(index) then
if getplayerx(i) = getplayerx(index) then
if getplayery(i) = getplayery(index) - 3 then
if getplayerhp(i) > getplayermp(index) / 2 then
call playermsg(index, "hit", 4)
call setplayerhp(i, getplayerhp(i) - getplayermp(index) / 2)
call sendhp(i)
else
call Globalmsg(getplayername(i) & " Has been killed by " & getplayername(index), 5)
end if
end if
end if
end if
    i = i + 1
loop
end if
    case 1
if getplayery(index) + 3 <= 14 then
call settile(getplayermap(index), getplayerx(index), getplayery(index) + 3, 5, 26, 0, 8)
call putvar("spell.ini", getplayername(index), "x", getplayerx(index))
call putvar("spell.ini", getplayername(index), "y", getplayery(index) + 3)
call putvar("spell.ini", getplayername(index), "map", getplayermap(index))
Call settimer("tmrtest " & index & "," & 0, 200)
do while i <= GetVar("data.ini", "max", "MAX_PLAYERS")
if getplayermap(i) = getplayermap(index) then
if getplayerx(i) = getplayerx(index) then
if getplayery(i) = getplayery(index) + 3 then
if getplayerhp(i) > getplayermp(index) / 2 then
call setplayerhp(i, getplayerhp(i) - getplayermp(index) / 2)
call sendhp(i)               
call playermsg(index, "hit", 4)
else
call Globalmsg(getplayername(i) & " Has been killed by " & getplayername(index), 5)
end if
end if
end if
end if
    i = i + 1
loop
end if
    case 2
if getplayerx(index) - 3 >= 0 then
    call settile(getplayermap(index), getplayerx(index) - 3, getplayery(index), 5, 26, 0, 8)
call putvar("spell.ini", getplayername(index), "x", getplayerx(index) - 3)
call putvar("spell.ini", getplayername(index), "y", getplayery(index))
call putvar("spell.ini", getplayername(index), "map", getplayermap(index))
Call settimer("tmrtest " & index & "," & 0, 200)
do while i <= GetVar("data.ini", "max", "MAX_PLAYERS")
if getplayermap(i) = getplayermap(index) then
if getplayerx(i) = getplayerx(index) - 3 then
if getplayery(i) = getplayery(index) then
if getplayerhp(i) > getplayermp(indeX) / 2 then
call setplayerhp(i, getplayerhp(i) - getplayermp(index) / 2)
call sendhp(i)               
call playermsg(index, "hit", 4)
else
call Globalmsg(getplayername(i) & " Has been killed by " & getplayername(index), 5)
end if
end if
end if
end if
    i = i + 1
loop
end if
    case 3
if getplayery(index) + 3 <= 19 then
    call settile(getplayermap(index), getplayerx(index) + 3, getplayery(index), 5, 26, 0, 8)
call putvar("spell.ini", getplayername(index), "x", getplayerx(index) + 3)
call putvar("spell.ini", getplayername(index), "y", getplayery(index))
call putvar("spell.ini", getplayername(index), "map", getplayermap(index))
Call settimer("tmrtest " & index & "," & 0, 200)
do while i <= GetVar("data.ini", "max", "MAX_PLAYERS")
if getplayermap(i) = getplayermap(index) then
if getplayerx(i) = getplayerx(index) + 3 then
if getplayery(i) = getplayery(index) then
if getplayerhp(i) > getplayermp(indeX) / 2 then
call setplayerhp(i, getplayerhp(i) - getplayermp(index) / 2)   
call playermsg(index, "hit", 4)
call sendhp(i)
else
call Globalmsg(getplayername(i) & " Has been killed by " & getplayername(index), 5)
end if
end if
end if
end if
    i = i + 1
loop                   
end if
    end select
call playermsg(index, getplayermp(index) / 2 & " Damage done (if hit)", 5)
call setplayermp(index, 0)
    exit sub
'blast-end---------------------------------------------------------------------------------

'Set game stuff-start-------------------------------------------------------------
case "/setstats"
'if getplayerlevel(index) = 1 then
call putvar("spell.ini", getplayername(index), "map", 0)
call putvar("spell.ini", getplayername(index), "x", 0)
call putvar("spell.ini", getplayername(index), "y", 0)
call putvar("spell.ini", getplayername(index), "healmap", getplayermap(index))
call putvar("spell.ini", getplayername(index), "healx", getplayerx(index))
call putvar("spell.ini", getplayername(index), "healy", getplayery(index))
call putvar("spell.ini", getplayername(index), "treemap", getplayermap(index))
call putvar("spell.ini", getplayername(index), "treex", getplayerx(index))
call putvar("spell.ini", getplayername(index), "treey", getplayery(index))
call putvar("spell.ini", getplayername(index), "magmamap", getplayermap(indeX))
call putvar("spell.ini", getplayername(index), "magmax", getplayerx(index))
call putvar("spell.ini", getplayername(index), "magmay", getplayery(index))
call playermsg(index, "Stats set", 5)
'else
'call playermsg(index, "you must be level 1 to do that if you havnt done it before please contact an admin to help you", 5)
'end if
exit sub
'set game stuff-end---------------------------------------------------------------

'reset nation leaders-start-------------------------------------------------------
case "/resetnationleader"
if getplayeraccess(index) > 0 then
call globalmsg("All Nation Leaders Have been removed!!!", 5)
call putvar("nation.ini", "light", "leader", "none")
call putvar("nation.ini", "magma", "leader", "none")
call putvar("nation.ini", "ocean", "leader", "none")
call putvar("nation.ini", "dark", "leader", "none")
call putvar("nation.ini", "tree", "leader", "none")
else
call playermsg(index, "Thats not a valid command!", 12)
end if
exit sub
'reset nation leaders-end---------------------------------------------------------

```
but really thats not even all the scripts ive made that just since ive started my script file for myself (only about from a month or 2 ago)

by the way i want the game to be constantly showing progress and proof that im not just ganna be waisting my time
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...