Npc referentes a Dinheiro.

Ferpa
Por Ferpa
em Actions e Talkactions

Ferpa

Ex-Diretor
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 09/07/05Posts: 23

Npc que Troca Dinheiro, Tem alguns bugs mas ja ajuda

Ta ai o Npc q troca dinheiro, vc fala change gold dai ele troca 100gps por 1 platinum

fala change 1k ele troca 1000gps por 10 platinum e fala change 10k que ele troca 10000gps por 100 platinum

BUGS

Assim q vc trocar o dinheiro e quiser trocar + vc tem q colocar dentro de uma bp ou guardar em outro lugar, pq se ñ o Npc vai trocar a platinum coin como se fosse gold.

Mais uma coisa o arquivo ".txt" é so salvar como ".lua" e colocar na pasta scripst

Configura ele assim no xml:

<?xml version="1.0" ?>

- <npc name="Npc Arkin" script="data/npc/scripts/Npc Arkin.lua" access="3">

  <health now="1" max="1" />

  <look type="128" head="144" body="114" legs="10" feet="114" />

  </npc>

Agora o txt:

-- sven, the bewitched bunny

-- it's a sample script, i dont know lua well enough to

-- make some fancy code

-- the good thing is, that this scripts can easily be developed

-- seperately from the main programm

-- perhaps we should write some docu

-- the id of the creature we are attacking, following, etc.

target = 0

following = false

attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)

end

function onCreatureAppear(creature)

end

function onCreatureDisappear(id)

if id == target then

  target = 0

  attacking = false

  selfAttackCreature(0)

  following = false

end

end

function onCreatureTurn(creature)

end

function onCreatureSay(cid, type, msg)

msg = string.lower(msg)

if string.find(msg, '(%a*)hi(%a*)') then

selfSay('Hi, ' .. creatureGetName(cid) .. '! I Can change your gold and buy your loot, I sell axes, swords and shields say job for help.')

end

if string.find(msg, '(%a*)job(%a*)') then

selfSay('To change 100 gold coins say change gold, to change 1000 say change 1k, to change 10000, say change 10k.')

end

if string.find(msg, '(%a*)axe(%a*)') then

selfSay('I sell: Dragon Lance [75k] Fire Axe [37k].')

end

if string.find(msg, '(%a*)sword(%a*)') then

selfSay('I Sell: Bright Sword [37k] Giant Sword [50k].')

end

if string.find(msg, '(%a*)shield(%a*)') then

selfSay('I Sell: Vampire Shield [40k] Phoenix Shield [50k]')

end

if string.find(msg, '(%a*)change gold(%a*)') then

sell(cid,2148,100,2152,1)

end

if string.find(msg, '(%a*)dragon lance(%a*)') then

sell(cid,2148,75000,2414,5)

end

if string.find(msg, '(%a*)fire axe(%a*)') then

sell(cid,2148,37000,2432,1)

end

if string.find(msg, '(%a*)bright sword(%a*)') then

sell(cid,2148,37000,2407,1)

end

if string.find(msg, '(%a*)giant sword(%a*)') then

sell(cid,2148,50000,2393,1)

end

if string.find(msg, '(%a*)vampire shield(%a*)') then

sell(cid,2148,40000,2534,1)

end

if string.find(msg, '(%a*)change 1k(%a*)') then

sell(cid,2148,1000,2152,10)

end

if string.find(msg, '(%a*)phoenix shield(%a*)') then

sell(cid,2148,50000,2539,1)

end

if string.find(msg, '(%a*)change 10k(%a*)') then

sell(cid,2148,10000,2152,100)

end

if string.find(msg, '(%a*)sell sword(%a*)') then

sell(cid,2376,1,2376,25)

end

if string.find(msg, '(%a*)sell hatchet(%a*)') then

sell(cid,2388,1,2388,20)

end

if string.find(msg, '(%a*)sell battle hammer(%a*)') then

sell(cid,2417,1,2148,60)

end

if string.find(msg, '(%a*)bye(%a*)') then

selfSay('Good bye, ' .. creatureGetName(cid) .. '!')

selfSay('And remember, when need change your gold or can sell me items visit me again.')

end

-- It is for npc sell anything.

--if string.find(msg, '(%a*)buy fishing rod(%a*)') then

-- sell(cid,2148,50,2580,1)

--end

end

function onCreatureChangeOutfit(creature)

end

function onThink()

--nothing special has happened

--but perhaps we want to do an action?

if following == true then

  moveToCreature(target)

  return

end

if attacking == true then

  dist = getDistanceToCreature(target)

  if dist == nil then

  selfGotoIdle()

  return

  end

  if dist <= 1 then

  selfAttackCreature(target)

  else

  moveToCreature(target)

  end

end

end

 

Suporte

PM - x

Fórum - V

Scoob

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/07/05Posts: 1

aew manu parabens vo e otimo nisso :)

Assinatura retirada.

Por favor leia as regras.

// Héliton

Ferpa

Ex-Diretor
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 09/07/05Posts: 23

Scoob

Sem ironia cara... Posts nao contam nada e sim o trabalho.. Eu fiz o que pediram eu ja dei algumas soluçoes vc nao quis nenhuma..

Entaum num posso fazer nada...

 

Suporte

PM - x

Fórum - V

victor

avatar
Banidos
Banidos

INFOS

Grupo: BanidosRegistrado: 04/09/05Posts: 1

vlw pelo npc

God_Kai

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 28/09/05Posts: 5

Kd o donwload?

x9kill

Frésco ♪
avatar
Cavaleiro
Cavaleiro

INFOS

Grupo: CavaleiroRegistrado: 22/09/05Posts: 178Char no Tibia: Tibia sux.

otimo post FERPA HAAIL You

affe God kai vc quer tudo mastigado faiz vc mesmo o npc seguindo as instruções é so aperta ctrl+c e depois ctrl+v isso n é nenhum trabalho :p

do you wanna a suruba ?

-

vtc3wedzwocumnphw0if.jpg


brigads
arcazy
signmg5.jpg
-
flyw
test2vk7.png

p/ os mikows

gi8ng2hzulbxb0yagvue.jpg
-
le7qv4iz311k1ugg95.jpg

Visitante xbowaxx

avatar
Visitante

INFOS

Grupo: Visitante

fico bom vlw

\o\

Lukus Jhor

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 09/10/05Posts: 64

ficou muito bom

94491504.jpg

MSN: warcraft_69@live.ru

x9kill

Frésco ♪
avatar
Cavaleiro
Cavaleiro

INFOS

Grupo: CavaleiroRegistrado: 22/09/05Posts: 178Char no Tibia: Tibia sux.

pow xbowaxx e lukus jhor parem de floodar pow

xbowaxx ja tem varios forum que eu vejo voce opstando

muito bom

vlw legal

\o\ isso é flood pow

do you wanna a suruba ?

-

vtc3wedzwocumnphw0if.jpg


brigads
arcazy
signmg5.jpg
-
flyw
test2vk7.png

p/ os mikows

gi8ng2hzulbxb0yagvue.jpg
-
le7qv4iz311k1ugg95.jpg