SH

Editando O Preço Das Runas

Por Shinokuk, 23 de mar. de 2006 em Tutoriais de Scripting

script
5.0 (1)
4
2.9k
ShinokukS
23 de março de 2006 às 14:29

Bem gente,muita gente ja me pediu no mirc e avisei q ia fazer um topic,entao aqui estou:

Editando o preço das runas no Dark Rodo:

Primeiro vá em data\npc\scripts e ache runes.xml

Clike com o botao direito e depois em editar:

Obs: Vou só tirar uma parte para n dar flood

vc verá algo assim

 

focus = 0talk_start = 0target = 0following = falseattacking = falsefunction onThingMove(creature, thing, oldpos, oldstackpos)endfunction onCreatureAppear(creature)endfunction onCreatureDisappear(cid, pos)  	if focus == cid then          selfSay('Good bye then.')          focus = 0          talk_start = 0  	endendfunction onCreatureTurn(creature)endfunction msgcontains(txt, str)  	return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))endfunction 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 runes, wands and rods.')    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, 'runes') then  	selfSay('I sell hmms (40gps), uhs (40gps), gfbs (60gps), explosions (60gps), sds (90gps) and blank runes (5gps). To buy more runes say "10 uh" or "100 sd".')  elseif msgcontains(msg, 'wands') then  	selfSay('I sell wand of inferno (15k), plague (5k), cosmic energy (10k), vortex (500gp) and dragonbreath (1k).')  elseif msgcontains(msg, 'rods') then  	selfSay('I sell quagmire (10k), snakebite (500gp), tempest (15k), volcanic (5k) and moonlight rod (1k).')  elseif msgcontains(msg, 'inferno') then  	buy(cid,2187,1,15000)  elseif msgcontains(msg, 'plague') then  	buy(cid,2188,1,5000)  elseif msgcontains(msg, 'cosmic energy') then  	buy(cid,2189,1,10000)  elseif msgcontains(msg, 'vortex') then  	buy(cid,2190,1,500)  elseif msgcontains(msg, 'dragonbreath') then  	buy(cid,2191,1,1000)  elseif msgcontains(msg, 'quagmire') then  	buy(cid,2181,1,10000)  elseif msgcontains(msg, 'snakebite') then  	buy(cid,2182,1,500)  elseif msgcontains(msg, 'tempest') then  	buy(cid,2183,1,15000)  elseif msgcontains(msg, 'volcanic') then  	buy(cid,2185,1,5000)  elseif msgcontains(msg, 'moonlight') then  	buy(cid,2186,1,1000)  elseif msgcontains(msg, '100 hmm') then  	buy(cid,2311,100,800)  elseif msgcontains(msg, '10 hmm') then  	buy(cid,2311,10,80)  elseif msgcontains(msg, 'hmm') then  	buy(cid,2311,5,40)  elseif msgcontains(msg, '100 uh') then  	buy(cid,2273,100,4000)  elseif msgcontains(msg, '10 uh') then  	buy(cid,2273,10,400)  elseif msgcontains(msg, 'uh') then  	buy(cid,2273,1,40)

 

Agora vamos la.

observe

 

  elseif msgcontains(msg, '100 hmm') then  	buy(cid,2311,100,800)

 

Bem,vc pode ver que varias linhas apareceem assim,sendo assim,vc pode modificar qualquer otra runa ou wand(rod) Que esplicarei logo ali na frente, observando a mensagem: elseif msgcontains(msg, '100 hmm') then <<<<<< Que nesse caso estaria comprando uma hmm 100x

 

	buy(cid,2311,100,800)

 

Note o numero(2311) é o id do item q vai ser vendido,neste caso a hmm.

Agora olhe o numero seguinte (100),será as cargas da runa,ou a quantidade de itens(akeles que n se misturam ao tentar juntar um a outrto)

E finalmente o ultimo numero (800) Que é o preço da runa,vc pode modificar a vontade.

Espero ter ajudado :wub: Fuiz

Editado Março 23 por Shinokuk

1 ano depois...
11 de outubro de 2007 às 11:37

bom tutorial, eu tinha problemas com isso no meu ot quando eu era novato nisso, vai ajudar mta gente

salvatoreS
11 de outubro de 2007 às 11:54

Separa o tutorial com cores depois que fica melhor cara.

 

Tá explicado direitinho mas eu achava que já existia um tópico falando disto..

 

Flws,

Abraços.

7 meses depois...
04 de maio de 2008 às 12:03

me salvo veii vlw xD