Gente eu estava procurando aqui e achei varios NPCs que vendem todo tipo de bp mais todos estavão bugado então resolvi coloca este q eu dei uma editada!
Primeiramente todos sabem vao para data/npcs/scripits copie qualquer um e renomeie para colorbp.lua e ponha isto nele ( apague tudu que tiver e ponha )
focus = 0 talk_start = 0 target = 0 following = false 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) .. '! I sell colored backpacks, each cost 50gps.') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.') elseif focus == cid then talk_start = os.clock() if msgcontains(msg, 'brown backpack') then buy(cid,1988,1,50) elseif msgcontains(msg, 'tiquanda backpack') then buy(cid,3940,1,50) elseif msgcontains(msg, 'green backpack') then buy(cid,1998,1,50) elseif msgcontains(msg, 'light backpack') then buy(cid,1999,1,50) elseif msgcontains(msg, 'red backpack') then buy(cid,2000,1,50) elseif msgcontains(msg, 'purple backpack') then buy(cid,2001,1,50) elseif msgcontains(msg, 'blue backpack') then buy(cid,2002,1,50) elseif msgcontains(msg, 'gray backpack') then buy(cid,2003,1,50) elseif msgcontains(msg, 'yellow backpack') then buy(cid,2004,1,50) elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then selfSay('Good bye, ' .. creatureGetName(cid) .. '!') 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
Feito isto salve tudu certinho...agora va para data/npcs copie qualquer um e renomeie para Yurinho Doido , apague tudo uq ah dentro e coloque isto:
<?xml version="1.0"?> <npc name="Yurinho Doido" script="data/npc/scripts/colorbp.lua" access="3"> <look type="128" head="4" body="114" legs="132" feet="115"/> </npc>
Ta ae o scripit do Yurinho Doido olha eu so dei uma editada eu nao considero os creditos a min!
COMENTE ELOGIOS E CRITICAS
Big Smoke