• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Requesting Revange System read please :P big rep++

izaak

New Member
Joined
Feb 1, 2009
Messages
161
Reaction score
3
i have an idea for a revange system , ive tryd to script it for days now but i fail.

the idea is this, if a player dies by another player he gets a storage value wich allows him and all his party members to teleport to the killer 1 time,when he says /revange player name or something

after the teleport to the killer the storage value should be deleted , its epic for rpg server..

if any1 likes it and decides to script it please share i really want it badly
i know its possible because this guy made a script that already teleports the party but then to urself
i want them to tp to the killer


this script made the idea of the revange system pop to my head xD
 
Last edited:
Have you copied the new script?? And actually i just tested it and it works for me using 0.4 server.

I donno if i can give values to storage in 0.3.6 in the form of letters.
 
yes i copied the new script , im using cryingdamson6pl1-gui might that be the problem?
its not giving any errors its just saying Seems Your killer have logged out.

it said you have the ability to " etc"

the only thing thats not working for me at this moment = /revange

iam verry gratefull that youre helping me im sorry that im such a pain in the ass its just that this is a verry nice script :P and i really want it badly
 
Okay for 0.3.6 change the talkaction file with that :)
LUA:
local Rev_PLAYER = 9097
 
function onSay(cid, words, param, channel)
    if getPlayerStorageValue(cid,Rev_PLAYER) == -1 then
	       doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You dont have a killer or you already took your revenge.")
	else
	      local search = 0
	       for _, tid in ipairs(getPlayersOnline()) do
			   if getCreatureName(tid) == tostring(getPlayerStorageValue(cid,Rev_PLAYER)) then
					     search = true
			   else 
					     search = false
			    end
 
		   end
		  
		   if (search == true) then
		        local killer = string.lower(getPlayerByNameWildcard(getPlayerStorageValue(cid,Rev_PLAYER)))
		        local pid = getThingPos(killer)
		         local pos = {x= pid.x+1,y= pid.y,z=pid.z}
		      doTeleportThing(cid,pos,false)
			  doSendMagicEffect(pos,10)
			  addEvent(doSendAnimatedText,100,pos,"Revenge!",10)
			  setPlayerStorageValue(cid,Rev_PLAYER,-1)
			   if isInParty(cid) then
		         for _, party in ipairs(getPartyMembers(cid)) do
				    if party ~= cid then
				       doTeleportThing(party,pos,false)
					   doPlayerSendTextMessage(party,19,getCreatureName(cid).." have summoned you to help him take revenge on his killer.")
			           doSendMagicEffect(pos,10)
				    end
				 end
			   end
		   else
			   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Seems Your killer have logged out.")
		   end
	end
 return true
end
 
YESSSSSSSSSS that works omfg You own for real xD haha thank you so much :D:D:D:D
omg when i wake up tommorow im gonna add u another rep++ hahaa thank you :D:D:D:D:D
 
tell me what isnt working errors?? if no errors then when you are killed and you log do you get message in orange or no? more info. :)
 
yes he dous the error on his server = that he cant teleport to the killer it says the killer seems to be logged out
he dousnt get a console error
he dous however get the message in orange telling him that he can revange.
i know its weird that im sending this info but iam helping him with his server :P and giving him every cool feater that i got in mine :D hehe he is using naxot version 4.5.0.1756
 
tell himm to try to use that
LUA:
local Rev_PLAYER = 9097
 
function onSay(cid, words, param, channel)
    if getPlayerStorageValue(cid,Rev_PLAYER) == -1 then
	       doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You dont have a killer or you already took your revenge.")
	else
	      local search = 0
	       for _, tid in ipairs(getPlayersOnline()) do
			   if string.lower(getCreatureName(tid)) == string.lower(tostring(getPlayerStorageValue(cid,Rev_PLAYER))) then
					     search = true
			   else 
					     search = false
			    end
 
		   end
 
		   if (search == true) then
		        local killer = string.lower(getPlayerByNameWildcard(getPlayerStorageValue(cid,Rev_PLAYER)))
		        local pid = getThingPos(killer)
		         local pos = {x= pid.x+1,y= pid.y,z=pid.z}
		      doTeleportThing(cid,pos,false)
			  doSendMagicEffect(pos,10)
			  addEvent(doSendAnimatedText,100,pos,"Revenge!",10)
			  setPlayerStorageValue(cid,Rev_PLAYER,-1)
			   if isInParty(cid) then
		         for _, party in ipairs(getPartyMembers(cid)) do
				    if party ~= cid then
				       doTeleportThing(party,pos,false)
					   doPlayerSendTextMessage(party,19,getCreatureName(cid).." have summoned you to help him take revenge on his killer.")
			           doSendMagicEffect(pos,10)
				    end
				 end
			   end
		   else
			   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Seems Your killer have logged out.")
		   end
	end
 return true
end
 
Back
Top