PNJ sell spawn

12/31/2011 23:49 darckistyle#1
Hi I managed to introduce a NPC boss who invoked the problem is that I can not make them pay I use Lua to do someone can help me?
12/31/2011 23:52 bouldog60#2
what do u mean by i can not make them pay ?
12/31/2011 23:54 darckistyle#3
I want people to pay, to invoke a boss
12/31/2011 23:56 bouldog60#4
send me pnj ill make them pay :P
12/31/2011 23:59 darckistyle#5
I send by mp

Still not finding can you help?
01/01/2012 01:09 ismokedrow#6
You will need to pick an NPC and construct a menu system for it via LUA (I'm not going to teach you don't bother asking, sorry.) Then using a basic knowledge of the console commands like add_npc you will find it rather easy to accomplish this task.
01/01/2012 01:26 darckistyle#7
I have the NPC, which invokes the boss, but it brings up the boss for free

I have created the NPC in the database and creates the script Lua already, the problem is that I can not make a payment, the invocations of boss
01/01/2012 01:41 ismokedrow#8
You need a payment system to check and update gold prices.
01/01/2012 01:42 darckistyle#9
here is my Lua

NPC Boss
Quote:
function get_module_name()
return "NPC_Boss"
end

function NPC_Merchant_crushop_Boss_contact()
dlg_title( "Shiva" )
dlg_text( "Je vends des boss a 10 millions!" )
dlg_menu( "Soulseeker", 'add_npc(116353 , 89758,9108022, 1)' )
dlg_menu( "Takin", 'add_npc(116353 , 89758,9110015, 1)' )
dlg_menu( "Raa", 'add_npc(116353 , 89758,145010, 1)' )
dlg_menu( "Furion", 'add_npc(116353 , 89758,9158002, 1)' )
dlg_menu( "Tamahakan", 'add_npc(116353 , 89758,9170001, 1)' )
dlg_menu( "Toktok", 'add_npc(116353 , 89758,9190001, 1)' )
dlg_menu( "Al-Ibkha,", 'add_npc(116353 , 89758,110102, 1)' )
dlg_menu( "Batisse", 'add_npc(116353 , 89758,120102, 1)' )
dlg_menu( "Amarlys", 'add_npc(116353 , 89758,130102, 1)' )
dlg_menu( "Nowpielon", 'add_npc(116353 , 89758,140102, 1)' )
dlg_menu( "Anatos", 'add_npc(116353 , 89758,150102, 1)' )
dlg_menu( "Tiarla", 'add_npc(116353 , 89758,160102, 1)' )
dlg_menu( "Ilros", 'add_npc(116353 , 89758,170102, 1)' )
dlg_menu( "Grewpain", 'add_npc(116353 , 89758,185001, 1)' )
dlg_menu( "Au revoir", '' )
dlg_show()
end
how it's done?? Can you help me?
01/01/2012 01:59 ismokedrow#10
Quote:
Originally Posted by darckistyle View Post
here is my Lua

NPC Boss


how it's done?? Can you help me?
Code:
function example_one()
 dlg_title("Example NPC")
 dlg_text("Example NPC Text <This will appear in the NPC's dialogue box.>")
 dlg_menu("Mob Spawn - xxk", 'spawn_mob()' )
 dlg_menu("Mob Spawn 2 - xxk", 'secondary_spawn_mob()' )
 dlg_menu("Nevermind", "")
 dlg_show()
end

function spawn_mob()
 local gold = get_value("gold")
 gold = tonumber(gold)

 if gold > xx then
 add_npc(x, y, mob_id, 1)
 sv("gold", gold-xx)
 update_gold_chaos()
 cprint("You have spawned a Monster.")
end
end

function secondary_spawn_mob()
 local gold = get_value("gold")
 gold = tonumber(gold)

 if gold > xx then
 add_npc(x, y, mob_id, 1)
 sv("gold", gold-xx)
 update_gold_chaos()
 cprint("You have spawned a Monster.")
end
end
01/01/2012 02:09 darckistyle#11
can I do?? please because I took a long time to do what the script I'm new to Lua
01/01/2012 03:32 AndrioX9#12
ismokedrow thank you very much it helped a lot:) Sorry for my english I'm a French guy