Big M O O K
New Member
- Joined
- Aug 24, 2008
- Messages
- 35
- Reaction score
- 0
Read here FIRST!!! please
I took my last post and put it up here
@empty
well, still i had a ton of errors in my .exe with the npc ignas gave me
@master
how do i control the money ammount it takes? thx for that btw
Edit: I also get this error when i get soft boots from him.
Lua Script Error: [Npc interface]
data/npc/scripts/soft_boots.lua
nCreatureSay
luaCreatureGetName<>/ Deprecated function. Use getCreatureName
but it still gives soft boots, and still takes 0 money :\
also did i put it in right spot? marked it red
soft_boot.lua

@empty
well, still i had a ton of errors in my .exe with the npc ignas gave me
@master
how do i control the money ammount it takes? thx for that btw
Edit: I also get this error when i get soft boots from him.
Lua Script Error: [Npc interface]
data/npc/scripts/soft_boots.lua

luaCreatureGetName<>/ Deprecated function. Use getCreatureName
but it still gives soft boots, and still takes 0 money :\
also did i put it in right spot? marked it red
soft_boot.lua
Code:
local focus = 0
local talk_start = 0
local target = 0
local following = true
local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Hello, ' .. creatureGetName(cid) .. '! Can I help you?')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! Wait a fuckin minute.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'soft boots') or msgcontains(msg, 'worn soft boots') then
if doPlayerRemoveItem(cid,6530,1) == 0 then
[COLOR="Red"]doPlayerRemoveMoney(cid, money)[/COLOR]
selfSay('I do it for free')
addon_state = 0
else
selfSay('Now, your boots are new!')
doPlayerAddItem(cid, 6132, 1)
talk_start = 0
end
elseif msgcontains(msg, 'offer') then
selfSay('I repair soft boots.')
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '! Come back soon!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Next Please...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
end
Last edited: