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

Parchment Room (with summon)

jpkulik

New Member
Joined
Mar 15, 2008
Messages
208
Reaction score
2
Hello Guy!
Im needing 1 script to finish the upgrade.
There it is.
When player use the parchment, win the key, and summon 4 demons in the room.
I can give you 1 rep point! :D
If you teach me howto.
Cya!
 
Code:
local demonpos1 = {x=870,y=937,z=8}
local demonpos2 = {x=870,y=941,z=8}
local demonpos3 = {x=875,y=937,z=8}
local demonpos4 = {x=875,y=941,z=8}

function onRemoveItem(item, tileItem, pos)
         doSummonCreature("Demon", demonpos1)
         doSummonCreature("Demon", demonpos2)
         doSummonCreature("Demon", demonpos3)
         doSummonCreature("Demon", demonpos4)
         return 1
end
 
20:54 You see a parchment.
It weighs 2.00 oz.
ItemID: [1948].
It is like a papper, when players use it, get a golden gey, and then, 4 demons apears..
Tanks
 
Code:
local reward = *ITEMID OF THE REWARD*
local count = 1 
local demonpos1 = {x=870,y=937,z=8}
local demonpos2 = {x=870,y=941,z=8}
local demonpos3 = {x=875,y=937,z=8}
local demonpos4 = {x=875,y=941,z=8}

function onUse(cid, item, frompos, item2, topos) 
         doRemoveItem(item.uid)
         doPlayerAddItem(cid,reward,count)
         doSummonCreature("Demon", demonpos1)
         doSummonCreature("Demon", demonpos2)
         doSummonCreature("Demon", demonpos3)
         doSummonCreature("Demon", demonpos4)
         return 1
end

The paper will be removed, that's ok isn't it?
 
Code:
local reward = *ITEMID OF THE REWARD*
local count = 1 
local storage = 4512 -- storage value of the quest
local demonpos1 = {x=870,y=937,z=8}
local demonpos2 = {x=870,y=941,z=8}
local demonpos3 = {x=875,y=937,z=8}
local demonpos4 = {x=875,y=941,z=8}

function onUse(cid, item, frompos, item2, topos) 
         if getPlayerStorageValue(cid,storage) ~= 1 then
                  doPlayerAddItem(cid,reward,count)
                  doSummonCreature("Demon", demonpos1)
                  doSummonCreature("Demon", demonpos2)
                  doSummonCreature("Demon", demonpos3)
                  doSummonCreature("Demon", demonpos4)
                  doPlayerSendTextMessage(cid,22,"You have found " .. getArticle(getItemName(reward)) .. getItemName(reward) .. ".")
         else
                  doPlayerSendTextMessage(cid,22,"You have allready done the quest.")
         end
         return 1
end
 
You should give the paper an unique id so it's not moveable.
Then add this line to actions.xml
Code:
<action uniqueid="*UNIQUE ID OF THE PAPER*" script="*SCRIPT NAME*.lua" />
 
Yes! Works, but, i can use it more then 1 time.
Can you fix it? Look:

21:50 You have found golden key.
21:50 You have found golden key.
21:50 You have found golden key.
21:50 You have found golden key.
21:50 You have found golden key.
21:50 You have found golden key.
21:50 You have found golden key.
21:50 You have found golden key.
If it is possible, do for the player can get it only once..
Cya fella
tanks
 
Oh sorry^^ Forgotten. Here we go:
Code:
local reward = 2091
local count = 1 
local storage = 4512 -- storage value of the quest
local demonpos1 = {x=870,y=937,z=8}
local demonpos2 = {x=870,y=941,z=8}
local demonpos3 = {x=875,y=937,z=8}
local demonpos4 = {x=875,y=941,z=8}

function onUse(cid, item, frompos, item2, topos) 
         if getPlayerStorageValue(cid,storage) ~= 1 then
                  doPlayerAddItem(cid,reward,count)
                  doSummonCreature("Demon", demonpos1)
                  doSummonCreature("Demon", demonpos2)
                  doSummonCreature("Demon", demonpos3)
                  doSummonCreature("Demon", demonpos4)
                  doPlayerSendTextMessage(cid,22,"You have found " .. getArticle(getItemName(reward)) .. getItemName(reward) .. ".")
                  setPlayerStorageValue(cid,storage,1)
         else
                  doPlayerSendTextMessage(cid,22,"You have allready done the quest.")
         end
         return 1
end
 
Back
Top