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

NPC help!! Store!!

Shinmaru

エロルアー Scripter!
Joined
Aug 20, 2007
Messages
1,988
Reaction score
88
Location
Puerto Rico
ok i need an NPC script that can sell an item(1945) and set actionid(50001) and set a special description, when he sells to the players.
Will really appreciate your cooperation.
 
isnt hard, with your current level you should be able o.o

just use a callback

LUA:
function creatureSayCallback(cid, type, msg)
    
    if(not npcHandler:isFocused(cid)) then
        return false
    end

    local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

    if msgcontains(msg, 'example') then
        selfSay('example answer', cid)
        
        --here you can script anything o.o
        --like
        --local item = doplayeradditem
        --dosetitemattribute aid ...
        etc
    end
    
    return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
 
Thanks!! I would have Rep, but I have to Rep others before I can Rep you.
But anyways Rep+!!
P.S
I suck at making NPC since I never took the time to understand those scripts.
 
Back
Top