SphereCommunity
Help solve this problem - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Help solve this problem (/Thread-Help-solve-this-problem)



Help solve this problem - victorstelzer - 06-29-2012 11:00 AM

When I click two times on the item, he must create a bag with some potions inside
Refresh (10)
Heal (10)

[itemdef i_bag_potions]
NAME=Bag Fechada de Reagentes
ID=i_bag
TYPE=t_normal
value=1200

on=@create
color=07a1

on=@dclick
Now I need when I click the second it creates the bag

on = @ dclick
serv.newitem = i_bag
new.bounce
consume a
return 1

So need to put items inside the bag

Refresh. Heal, Cure Poison, Agility


RE: Help solve this problem - Extreme - 06-29-2012 11:46 AM

Cara, pra que fazer dois script se pode fazer um só?
Code:
[ITEMDEF I_BAG_POTIONS]
NAME Potions Bag
ID I_BAG

ON=@CREATE
COLOR 07A1
ITEM=I_POTION_REFRESH,10
ITEM=I_POTION_HEAL,10
ITEM=I_POTION_CURE,10
ITEM=I_POTION_POISON,10
ITEM=I_POTION_AGILITY,10
Outra coisa, te perguntei se era brasileiro você não respondeu.
Bem mal educado você.


RE: Help solve this problem - victorstelzer - 06-30-2012 02:17 AM

Ohh não vi está pergunta foi mausss ......... por isso não respondi..........

Mais tipo assim e uma bag fechada. quando der 2 click ela cria uma bag normal do jeito que postei o script so que a bag vazia.

Precisa add os itens no script que postei.


Do jeito que você postou ele cria a bag com tudo dentro sim , mais tipo assim , este item que quero criar vai custar tantos golds, Voce compra ela e ela vem fechada, quando der 2 click ele conseme a bag dakela cor, e cria outra com a cor normal de bag e preciso que add os itens.


RE: Help solve this problem - Extreme - 06-30-2012 03:18 AM

Então usa assim:
Code:
[ITEMDEF I_BAG_POTIONS]
NAME Potions Bag
ID I_BAG
TYPE T_EQ_SCRIPT

ON=@CREATE
COLOR 07A1
ON=@DCLICK
SERV.NEWITEM I_BAG_POTIONS_SEILA
NEW.CONT <SRC>
REMOVE
RETURN 1

[ITEMDEF I_BAG_POTIONS_SEILA]
NAME Potions Bag Seila
ID I_BAG

ON=@CREATE
ITEM=I_POTION_REFRESH,10
ITEM=I_POTION_HEAL,10
ITEM=I_POTION_CURE,10
ITEM=I_POTION_POISON,10
ITEM=I_POTION_AGILITY,10
Tenta isso, deve dar certo.


RE: Help solve this problem - victorstelzer - 06-30-2012 11:15 AM

E fiz o teste aqui mais ele so cria a bag vazia mesmo

eu tenho esse script que faz isso
So que esse e de reagents precisa o de potions


[itemdef i_bag_regs]
NAME=Bag Fechada de Reagentes
ID=i_bag
TYPE=t_normal
value=1200

on=@create
color=07a1

on=@dclick
serv.newitem=tm_BAG_OF_MAGIC
new.bounce
src.anim 17
src.sound snd_spell_gate_travel
consume 1 i_bagmagic
return 1