• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Scripts I need for a Quest :p

Ray Rewind

Doctor
Joined
Jun 6, 2009
Messages
1,349
Reaction score
76
Location
Germany
Heya !:) Can someone help me ? I need those scripts


- If player use item on X Monster he gets storage XXXX



-Item in a Room will remove TP Outside so noone can enter- Monster will spawn if player click on statue -> mOnster spawn -> kill -> next spawn << this happen 4x then the last monster die a teleport appear and player gets XX Storage
please
 
Last edited:
Code:
local str = xxx
function onStepIn(cid, item, position, fromPosition)
 if(item.actionid == xxx and getPlayerStorageValue(cid) == 0) then
 doPlayerSetStorageValue(cid, str, 1)
 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "any message u need.")
else
doPlayerSendCancel(cid, "any message u need.")
 end
 return true
end
 
- If player use item on X Monster he gets storage XXXX
Code:
local t = {
    ["Dragon"] = {85856}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local v = t[getCreatureName(itemEx.uid)]
    if v and isMonster(itemEx.uid) and getPlayerStorageValue(cid, v[1]) < 1 then
        setPlayerStorageValue(cid, v[1], 1)
        doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_GREEN)
    else
        doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_POFF)
    end
    return true
end
 
PHP:
local t = {
    ["The Mutated Zalamon"] = {11233}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local v = t[getCreatureName(itemEx.uid)]
    if v and isMonster(itemEx.uid) and getPlayerStorageValue(cid, v[1]) < 1 then
        setPlayerStorageValue(cid, v[1], 1)
        doPlayerSendTextMessage(cid, 22, "Great Victory against the Mutated Zalamon! You have absorbed his soul!")
    else
        doPlayerSendTextMessage(cid, 22, "You already absorbed his soul!")
    end
    return true
end


possible ?


btw is it possible to use item on dead monster to get storage?? xD
 
Last edited:
Code:
local t = {
    [CORPSE_ID] = {11233}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local v = t[itemEx.itemid]
    if v and isCorpse(itemEx.uid) and getPlayerStorageValue(cid, v[1]) < 1 then
        setPlayerStorageValue(cid, v[1], 1)
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Great Victory against the Mutated Zalamon! You have absorbed his soul!")
        doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_GREEN)
    else
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You already absorbed his soul!")
        doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_POFF)
    end
    return true
end
 
TY Ninja !

My Question now

The BoSS Monster CORPSE ID is 1234

and a normal monster got the same CORPSE ID 1234 so when a player uses the item on the normal monster crops ID he also gets the storage right ?




Another Script I need is :

Item X is used on item Y and then a Monster Spawn.
 
Code:
local str = xxx
function onStepIn(cid, item, position, fromPosition)
if(item.actionid == xxx and getPlayerStorageValue(cid) == 0) then
doPlayerSetStorageValue(cid, str, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "any message u need.")
else
doPlayerSendCancel(cid, "any message u need.")
end
return true
end

it doesnt work

Code:
local str = 11231
    function onStepIn(cid, item, position, fromPosition)
        if(item.uid == 11240 and getPlayerStorageValue(cid) == 0) then
        doPlayerSetStorageValue(cid, str, 1)
        doPlayerSendTextMessage(cid, 22, "You finished the Maze now you are able to use the Shortcut!")
    else
        doPlayerSendCancel(cid, "Error Contact Support!")
    end
    return true
end


[26/11/2013 18:34:27] [Error - MoveEvents Interface]
[26/11/2013 18:34:27] data/movements/scripts/wote/storagemaze.lua:onStepIn
[26/11/2013 18:34:27] Description:
[26/11/2013 18:34:27] (luaGetCreatureStorage) Creature not found
 
Code:
local str = 11231
function onStepIn(cid, item, position, fromPosition)
    if isPlayer(cid) and getPlayerStorageValue(cid, str) < 1 then
        setPlayerStorageValue(cid, str, 1)
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You finished the Maze now you are able to use the Shortcut!")
    else
        doPlayerSendCancel(cid, "Error Contact Support!")
    end
    return true
end
 
Last edited:
it doesnt work

Code:
local str = 11231
    function onStepIn(cid, item, position, fromPosition)
        if(item.uid == 11240 and getPlayerStorageValue(cid) == 0) then
        doPlayerSetStorageValue(cid, str, 1)
        doPlayerSendTextMessage(cid, 22, "You finished the Maze now you are able to use the Shortcut!")
    else
        doPlayerSendCancel(cid, "Error Contact Support!")
    end
    return true
end


[26/11/2013 18:34:27] [Error - MoveEvents Interface]
[26/11/2013 18:34:27] data/movements/scripts/wote/storagemaze.lua:eek:nStepIn
[26/11/2013 18:34:27] Description:
[26/11/2013 18:34:27] (luaGetCreatureStorage) Creature not found
The error happens when a monster steps on the tile.

There you go.
Code:
local str = 11231
function onStepIn(cid, item, position, fromPosition)
   if isPlayer(cid) then
     if getPlayerStorageValue(cid, str) < 1 then
       setPlayerStorageValue(cid, str, 1)
       doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You finished the Maze now you are able to use the Shortcut!")
     else
       doPlayerSendCancel(cid, "You have already finished the Maze.")
     end
  end
  return true
end
 
but in the script no unique Id is needed?


btw I used this script on a mystic flame the problem now is that the flame doesn't work as teleporter
 
Last edited:
Back
Top