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

[8.11]NPC 2 slowa- inna reakcja

Hekan

New Member
Joined
Jun 14, 2008
Messages
94
Reaction score
0
Poszukuje NPC ktory na 2 te same slowa zareaguje inaczej
Tak jak jest w Norseman Addon
Prose o pomoc
 
Code:
if msgcontains(msg, 'addon') then
    if getPlayerStorageValue(cid, 10000) < 1 then
        selfSay("So, I\'ll give you first addon for 5 shards, okay?")
        talkState = 1
    elseif getPlayerStorageValue(cid, 10000) == 2 then
        selfSay("You already have the first addon, why don\'t you take the second for 10 shards from me. Want it?")
        talkState = 2
    end
elseif msgcontains(msg, 'yes') and talkState == 1 then
    if doPlayerTakeItem(cid, SHARD_ID, 5) == TRUE then
        selfSay("Here is your first addon, thank you!")
        doPlayerAddOutfit(cid, NORSEMAN, 1)
        doPlayerAddOutfit(cid, NORSEWOMAN, 1)
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
        setPlayerStorageValue(cid, 10000, 2)
        talkState = 0
    else
        selfSay("You do not have 5 shard, imbecile!")
        talkState = 0
    end
elseif msgcontains(msg, 'yes') and talkState == 2 then
    if doPlayerTakeItem(cid, SHARD_ID, 10) == TRUE then
        selfSay("Here is your second addon!")
        doPlayerAddOutfit(cid, NORSEMAN, 3)
        doPlayerAddOutfit(cid, NORSEWOMAN, 3)
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
        setPlayerStorageValue(cid, 10000, 3)
        talkState = 0
    else
        selfSay("Learn maths you idiot, you do not have 10 shards.")
        talkState = 0
    end
end
 
Back
Top