How to do quest with actions

At first you need a exemple of quest script like that:

—example of quest—function onUse(cid, item, frompos, item2, topos) if item.uid 2000 then queststatus = getPlayerStorageValue(cid,1000)
if queststatus -1 or queststatus 0 or queststatus 3 or queststatus 2 or queststatus 4 or queststatus 5 or queststatus 6 or queststatus 7 then doPlayerSendTextMessage(cid,22,"You have found a Vampire Shield.") picture_uid = doPlayerAddItem(cid,2534,1) setPlayerStorageValue(cid,1000,1) end else return 0 end

return 1 end

Then the only thing you have to change is at second line "if item.uid (there you should put the number you want) then.

Well.. that number you will have to put in the map, on the item you want to put the quest by clicking right click on the item and properties. (If its simeone editor).

There is the most important part of the quest script:
-To make them work fine, and to do more than one quest, you have to put all queststatus how quest scripts you have.. that means (if you have 3 quest, you will have something like that “if queststatus -1 or queststatus 0 or queststatus == 3”, ATENTION!! The number 1 is missing cause its the queststatus that questscrip have.. “setPlayerStorageValue(cid,1000,1)”.. so.. the other quest for exemple will have “setPlayerStorageValue(cid,1000,2)” and the missing queststatus has to be the number 2 and need to have the other queststatus, like quest1= storage1 then in that quest the queststatus missing will be the 1, in quest2=storage2 then in that quest the queststatus missing will be the 2).

And finally you have to change that text for the item you are going to put in the quest “doPlayerSendTextMessage(cid,22,”You have found a Vampire Shield.”)” and then put the ID of the item there “picture_uid = doPlayerAddItem(cid,2534,1)” and thats all.

Related Articles
Paladin guide: Making money
Paladin guide: Professional hunting - levels 61-80
Paladin guide: Graduated hunting rights - levels 40-60
Paladin guide: Main - levels 9-40
Paladin guide: The Infamous Rookgaard - levels 1-8
How to train a Knight
How to become a good mapper
How to make conjured items
How to start Tibia 7.5 server
How to make cheat mode

Previous article: How to change the attack speed
Next article: Scripting a house