Jump to content
  • 0

[Requist]


Bituse

Question

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0

P Skill (NPC) Quest + Secondary skills, enjoy

 

1. P-Skill for NPC =>

quest skill begin

state start begin

when 20094.chat."Skills" begin

say_title(mob_name(npc.get_race())..":")

say("Hello "..pc.name)

say("What abilities you need?....[ENTER][ENTER][ENTER][ENTER]")

local s = select ("M","G","P","Exit")

if s==1 then

sk=20

skill = "M"

limita=30

bani=1000000

elseif s==2 then

sk=30

skill = "G"

limita=60

bani=10000000

elseif s==3 then

sk=59

skill = "P"

limita=90

bani=50000000

end

say_title(mob_name(npc.get_race())..":")

say("Hello "..pc.name)

say("You have choosed  "..skill.."")

say("to continue you need ")

say("Level: "..limit.."[ENTER]Yang:"..yang.."")

say("Wanna continue?[ENTER](c) M2Dev")

if select("Da","Nu")==1 then

if pc.get_level() >=limit and pc.get_gold() >= yang then

pc.changegold ( -yang )

table.foreachi(special.active_skill_list[pc.get_job()+1][pc.get_skill_group()],function(r,skill) pc.set_skill_level(skill,sk) end)

end

elseif pc.get_level() < limit then

say_title(mob_name(npc.get_race())..":")

say("Hello "..pc.name)

say("You choosed your skills "..skill.."")

say("but you don't have the necessary level ("..limit..")")

say("comeback when you grow up.")

elseif pc.get_gold() < yang then

say_title(mob_name(npc.get_race())..":")

say("Hello "..pc.name)

say("You have choosed your skills"..skill.."")

say("but you don't have enough gold ("..yang..")")

say("come back when you have enough money.")

end

end

end

end[/spoiler]

2. Part 2, for secondary skills

 

state start begin

when 50512.use begin

say_title("P-Skill Script:")

say("Hello "..pc.name)

say("Choose what abilities you want....[ENTER][ENTER][ENTER][ENTER]")

local s = select ("M","G","P","Secondary","Exit")

if s==1 then

sk=20

skill = "M"

limita=30

bani=1000000

elseif s==2 then

sk=30

skill = "G"

limita=60

bani=10000000

elseif s==3 then

sk=59

skill = "P"

limita=90

bani=50000000

elseif s==4 then

sk=59

skill = "Secondary"

limita=90

bani=50000000

end

say_title("P-Skill Script:")

say("Hello "..pc.name)

say("You have choosed your skills "..skill.."")

say("To continue you need level ")

say("Nivelul: "..limit.."[ENTER]Yang:"..yang.."")

say("Wanna continue?[ENTER](c) M2Dev")

if select("Yes","No")==1 then

if pc.get_level() >=limit and pc.get_gold() >= yang then

pc.changegold ( -yang )

if skill=="Secundare" then

pc.set_skill_level(121 ,59)

pc.set_skill_level(122 ,2)

pc.set_skill_level(123 ,59)

pc.set_skill_level(124 ,59)

pc.set_skill_level(125 ,59)

pc.set_skill_level(126 ,59)

pc.set_skill_level(127 ,59)

pc.set_skill_level(128 ,59)

pc.set_skill_level(129 ,59)

pc.set_skill_level(130 ,30)

pc.set_skill_level(131 ,59)

pc.set_skill_level(132 ,59)

pc.set_skill_level(133 ,59)

pc.set_skill_level(134 ,59)

pc.set_skill_level(135 ,59)

pc.set_skill_level(136 ,59)

pc.set_skill_level(137 ,59)

elseif skill=="G" or skill=="M" or skill=="P" then

table.foreachi(special.active_skill_list[pc.get_job()+1][pc.get_skill_group()],function(r,skill) pc.set_skill_level(skill,sk) end)

end

end

elseif pc.get_level() < limita then

say_title("P-Skill Script:")

say("Hello "..pc.name)

say("You have choosed your skills "..skill.."")

say("but you don't have the necessary level("..limit..")")

say("Come back when you grow.")

elseif pc.get_gold() < yang then

say_title("P-Skill Script:")

say("Hello "..pc.name)

say("You have choosed your skills "..skill.."")

say("but you don't have enough yang ("..yang..")")

say("come back when you got them.")

end

end

end

end

 

Limit = Level Limit

Yang = Necessary yang

The quest isn't tested and made by me so it can have some bugs but you can easy deal with them as long as you modify logically.
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.