• 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!

[request] soulpoint script

semary

[BB] OTland
Joined
May 3, 2009
Messages
813
Reaction score
18
Location
E G Y P T
hello otland.

i need to add in this script
when player kill some one he get 1 soul point + items
and when he die he lose 1 soul point..

PHP:
function onKill(cid, target, lastHit)
local reward = {
        item = 2152, --ITEM ID!
        count = 1 -- How many?
}
        if(isPlayer(cid) and isPlayer(target)) then
	if getPlayerIp(cid) ~= getPlayerIp(target) then
                doPlayerAddItem(cid, reward.item, reward.count)
else
doPlayerAddExperience(cid, -1000000)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have been punished for killing a player of the same IP.")
                end
end
return TRUE
end

wrong code sorry i am in harry
 
s:?
Lua:
function onKill(cid, target, lastHit)
	local reward = 
			{
			item = 2152, --ITEM ID!
			count = 1, -- How many?
			soul = 1
			}
	if(isPlayer(cid) and isPlayer(target))then
		if getPlayerIp(cid) ~= getPlayerIp(target) then
			doPlayerAddItem(cid, reward.item, reward.count)
			doPlayerAddSoul(cid, reward.soul)
			doCreatureSay(cid, "GRATZ", TALKTYPE_MONSTER)
		else
			doPlayerAddExperience(cid, -1000000)
			doPlayerAddSoul(cid, -reward.soul)
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have been punished for killing a player of the same IP.")
		end
	end
	return true
end
 
Last edited:
Code:
local reward = {
  item = 2152,
  count = 1,
  soul = 1
}

function onKill(cid, target, lastHit)
  if isPlayer(cid) and isPlayer(target) then
    doPlayerAddItem(cid, reward.item)
    doPlayerAddSoul(cid, reward.soul)
    doCreatureSay(cid, "GRATZ!", TALKTYPE_MONSTER)
  elseif getPlayerIp(cid) ~= getplayerIp(target) then
    doPlayerAddSoul(cid, -reward.soul)
    doPlayerAddExperience(cid, -1000000)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have been punished for killing a player of the same IP.")
  end
  return true
end

function onDeath(cid)
  return doPlayerAddSoul(cid, -1)
end

if that doesn't work then just make a new .lua file and paste this in it:

Code:
function onDeath(cid)
  return doPlayerAddSoul(cid, -1)
end

but you have to remove that part from your script :p
 
Last edited:
can you read?
Lua:
        local reward =
                        {
                        item = 2152, --ITEM ID!
                        count = 1, -- How many?
                        soul = 1 -- SOUL NUMBER TO REMOVE!!!!!!!!
                        }
 
@Everyone
LOL READ!
yes i can read and i told you that it dont remove soul point when I die
This should work, if I'm not mistaking you wanted that the player dieing
loses a soul and the killer gains a soul as long as they are both not
from the same IP.
No Rep necessary~!
Code:
function onKill(cid, target, lastHit)
local reward =
                {
                item = 2152, --ITEM ID!
				count = 1, -- How many?
                soul = 1
                }
    if(isPlayer(cid) and isPlayer(target))then
		if getPlayerIp(cid) ~= getPlayerIp(target) then
            doPlayerAddItem(cid, reward.item, reward.count)
            doPlayerAddSoul(cid, reward.soul)
			doPlayerAddSoul(target, -reward.soul)
            doCreatureSay(cid, "GRATZ", TALKTYPE_MONSTER)
        else
            doPlayerAddExperience(cid, -1000000)
            doPlayerAddSoul(cid, -reward.soul)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have been punished for killing a player of the same IP.")
        end
    end
return true
end
 
Last edited:
Back
Top