- Joined
- Aug 6, 2007
- Messages
- 1,786
- Reaction score
- 37
Oke,
Today i wanted to make an lottery ticket seller for my addon quest and for Questing, But as soon as i started i got some troubles that you cant fix unless you got 2 New Lua functions
So Tala mind helping us out?
How does my ticket seller works:
-U need to trade 100 Empty vials for 1 lottery ticket (Need new function)
-When u get the item it sets an Description and an action it (Action id bug)
Oke i'v used this script.
Now i have these bugs.
-Player can use all vials becuase the have the same action id i tought about an new vial remove function example "DoRemoveVial(Cid,itemid,Type,Count)"
And how to use it well to creat an Empty vial u need to sai /i 2006 8, so u need to use this function like.
DoRemoveVial(Cid,2006,8,100) (I want 100 vials removed.
Oke the second thing i found out that you cant set an description + action id, so i have 2 solutions.
-Change actiond id code so u can make it work with description or an new description function like
"getItemSpecialDescription('It sais: Congratulations, You have an Winning Ticket!')" why do i need this description checker? because other Npc's need to check if you have an winning ticket through this or action id.
Tala i really hope u can help me out actually us since more people are going to use it.
Today i wanted to make an lottery ticket seller for my addon quest and for Questing, But as soon as i started i got some troubles that you cant fix unless you got 2 New Lua functions

So Tala mind helping us out?
How does my ticket seller works:
-U need to trade 100 Empty vials for 1 lottery ticket (Need new function)
-When u get the item it sets an Description and an action it (Action id bug)
Oke i'v used this script.
Code:
if msgcontains(msg, 'ticket') or msgcontains(msg, 'tickets') then
selfSay('So you want to trade 100 empty vials for 1 lottery Ticket?')
talk_state = 1
elseif msgcontains(msg, 'yes') and talk_state == 1 then
if rand >1 and rand <10 then
if doPlayerTakeItem(cid,2006,1) then
ticket = doPlayerAddItem(cid,5957,1)
if doSetItemSpecialDescription(ticket,'It sais: Congratulations, You have an Winning Ticket!') and doSetItemActionId(ticket,8888) then
selfSay('Here you are!')
elseif msgcontains(msg, 'no') then
selfSay('Then not.')
talk_state = 0
end
end
end
end
return TRUE
end
Now i have these bugs.
-Player can use all vials becuase the have the same action id i tought about an new vial remove function example "DoRemoveVial(Cid,itemid,Type,Count)"
And how to use it well to creat an Empty vial u need to sai /i 2006 8, so u need to use this function like.
DoRemoveVial(Cid,2006,8,100) (I want 100 vials removed.
Oke the second thing i found out that you cant set an description + action id, so i have 2 solutions.
-Change actiond id code so u can make it work with description or an new description function like
"getItemSpecialDescription('It sais: Congratulations, You have an Winning Ticket!')" why do i need this description checker? because other Npc's need to check if you have an winning ticket through this or action id.
Tala i really hope u can help me out actually us since more people are going to use it.