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

Monster die and add storage value for your killer!

Albert José

Rambocop Infernus
Joined
Jun 10, 2008
Messages
88
Solutions
1
Reaction score
13
Location
Portugal
I need 2 scripts!
1º: The monster Ungreez add xxx storage value for your killer (the player take more exp in the monster "own")
2º: The Player need use more of one switch for remove a rock!

Sorry for bad english and thanks for your help!!! ;)
 
same problem was, the more the solution is quite easy.

PT/BR: Estava com o mesmo problema, mais é bem facil a solução.

Code:
function onDeath(cid, corpse, killer)
    if "Ungreez" == getCreatureName(cid) then
        setPlayerStorageValue(killer, 10000,1)	
    else
        return FALSE
    end
	return TRUE
end
 
Try this one

local UIDS = {5100, 5101, 5102}
local MISSION_STORE = 5795
local STONE_POSITION = {x = 1148, y = 1243, z = 8, stackpos = 1}
local TIME = 5 ---time in minutes the stones stay away for
local STONE_ID = 1497 --- the ID of the stones
local nice_done = "Nice! Keep that way."
local done = "You may proceed now!"

function onUse(cid, item, frompos, item2, topos)
local MISSION_STATUS = math.max(getGlobalStorageValue(MISSION_STORE),0)


if item.itemid == 1945 and MISSION_STATUS < 0 then
setGlobalStorageValue(MISSION_STORE, 0)
end
if item.itemid == 1945 and MISSION_STATUS >= 0 then
doTransformItem(item.uid, 1946, 1)
setGlobalStorageValue(MISSION_STORE, MISSION_STATUS + 1)
MISSION_STATUS = getGlobalStorageValue(MISSION_STORE)
doCreatureSay(cid, nice_done, TALKTYPE_ORANGE_1)

else
doTransformItem(item.uid, 1945, 1)
setGlobalStorageValue(MISSION_STORE, MISSION_STATUS - 1)
MISSION_STATUS = getGlobalStorageValue(MISSION_STORE)
doCreatureSay(cid, "Bad Move!", TALKTYPE_ORANGE_1)
end

if MISSION_STATUS == 3 then ------- number of levers
doCreatureSay(cid, done, TALKTYPE_ORANGE_1)
local STONE1 = getThingfromPos(STONE_POSITION)
doRemoveItem(STONE1.uid, 1)
doTransformItem(UIDS, 1945, 1)
addEvent(doReplaceStones, TIME * 1000 * 60, STONE_POSITION)
setGlobalStorageValue(MISSION_STORE, 0)
end
return 1
end


function doResetSwitches()
for u = 1, #UIDS do
doTransformItem(UIDS, 1945, 1)
end
end

function doReplaceStones(p)
doResetSwitches()
doCreateItem(STONE_ID, 1, STONE_POSITION)

end
 
@@UPP
I am thankful if it will be able to explain as I make to configure script if in the case they will be seven Switch!
local UIDS = {5100, 5101, 5102}
/\ Where I must for this?
And please post the tag for action.xml!?

Thanks for all and sorry for my bad english
 
Back
Top