ScreamMyName 100 Posted January 25, 2016 Share Posted January 25, 2016 Sup guys, I'm feeling kind of dumb today. I was trying to write a simple quest for poly shop but i failed don't know why. How do I set the socket? http://wklej.org/hash/447cfbc9923/ quest poly begin state start begin when 80009.use begin local poly = { [1] = {"xx_1", 101}, [2] = {"xx_2", 502}, } local p = {} for i =1, table.getn(poly) do table.insert(p, poly[1]) end local s = select_table(p) local polys = poly pc.give_item2(70104, item.set_socket(0, polys[2])) --pc.give_item2(70104) --item.set_socket(0, polys[2]) end endend Link to comment Share on other sites More sharing options...
Shang 369 Posted January 25, 2016 Share Posted January 25, 2016 Use pc.give_item2_select(vnum, count) instead of pc.give_item2. 2 Link to comment Share on other sites More sharing options...
ScreamMyName 100 Posted January 25, 2016 Author Share Posted January 25, 2016 6 minutes ago, Shang said: Use pc.give_item2_select(vnum, count) instead of pc.give_item2. F** banter mate Cheers It works! Dunno why I never thought of that #close request Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19680 Posted January 25, 2016 Honorable Member Share Posted January 25, 2016 For prior game file versions; use like this: quest books begin state start begin when 50000001.use begin --when kill with npc.is_pc() == false and npc.race >= 8000 and npc.race < 8500 begin --for stones if pc.get_empty_inventory_count() < 1 then syschat("You cannot open this box while you doesn't free up some spaces in your inventory.") return end local sb = { {{1,2,3,4,5,6},{16,17,18,19,20,21},},--Warrior {{31,32,33,34,35,36},{46,47,48,49,50,51},},--Assassin {{61,62,63,64,65,66},{76,77,78,79,80,81},},--Sura {{91,92,93,94,95,96},{106,107,108,109,110,111},},--Shaman --{{170,171,172,173,174,175}},--Wolfman } local class = number(1,table.getn(sb)) local group = number(1,2) --if class == WOLFMAN then group=1 end local skill_vnum = number(1, table.getn(sb[class][group])) local itemid = pc.give_item2(50300,1) if itemid ~= 0 then item.select(itemid) item.set_socket(0, skill_vnum) else syschat(string.format("ERROR: code(0x%d|0x%d|0x%d)", class, group, skill_vnum)) end end end end Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now