ItsFree Posted May 30, 2015 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 121 Reputation: 7 Joined: 04/11/15 Last Seen: October 29, 2024 Share Posted May 30, 2015 Hi... i've this script: poring_w02,97,202,5 script Skull Points 63,{ .@char_id = getcharid(0); .@count = countitem( 7420 ) - countitem2( 7420, 1,0,0, 254, 0, .@char_id, 0 ); // can't exchange his own skull mes "You have "+ .@count +" skull."; if ( .@count == 0 ) close; mes "Exchange your pvp skulls ?"; next; if ( select( "~ Yes", "~ No" ) -1 ) end; .@count = countitem( 7420 ) - countitem2( 7420, 1,0,0, 254, 0, .@char_id, 0 ); getinventorylist; while( .@i < @inventorylist_count && .@j < .@count ) { if ( @inventorylist_id[.@i] == 7420 && @inventorylist_card3[.@i] != .@char_id ) { delitem2 7420, @inventorylist_amount[.@i],1,0,0, @inventorylist_card1[.@i], 0, @inventorylist_card3[.@i], 0; .@j++; } .@i++; } #skull_points = #skull_points + .@count; mes "You got "+ .@count +" Skull points. Total: "+ #skull_points +" Skull points."; close; } works but i tried to use this: http://svn.code.sf.net/p/rathena/svn/trunk/npc/custom/quests/quest_shop.txt but just i can't.... i tried alot of times changing but i cant :C anyone can help me? i also tried with this.... but the npc doesnt count me the skull_points and neither show me the items... poring_w02,103,203,5 script Skull Trader 405,{ mes .name$; mes "Tenes "+countitem(.slulltcg_item)+" "+getitemname(.skulltcg_item); mes "¿Queres mirar los items?"; next; if(select("Si:No") == 2) { close; } close2; callshop "SKULLTCG_SHOP",1; npcshopattach "SKULLTCG_SHOP"; dispbottom "Tenes "+countitem(.skulltcg_item)+" "+getitemname(.skulltcg_item); end; OnBuyItem: for(set @i,0; @i < getarraysize(@bought_nameid); set @i,@i+1) { for(set @j,0; @j < getarraysize(.SKULLTCG_ITEMS); set @j,@j+2) { if(.SKULLTCG_ITEMS[@j] == @bought_nameid[@i]) { set @itemcost,(.SKULLTCG_ITEMS[(@j+1)]*@bought_quantity[@i]); set @totalcost,(@totalcost+@itemcost); break; } } } if(@totalcost > countitem(.skulltcg_item)) { dispbottom "No tenes suficientes "+getitemname(.skulltcg_item); } else { for(set @i,0; @i < getarraysize(@bought_nameid); set @i,@i+1) { getitem @bought_nameid[@i],@bought_quantity[@i]; } delitem .skulltcg_item,@totalcost; dispbottom "Gracias por tu compra."; dispbottom "Tenes "+countitem(.skulltcg_item)+" "+getitemname(.skulltcg_item); } set @totalcost,0; deletearray @bought_nameid[0],128; deletearray @bought_quantity[0],128; end; OnInit: npcshopdelitem "SKULLTCG_SHOP",909; // Deja esto set .name$,"[Trading Card Game Shop]"; set .skulltcg_item,#skull_points; // Mete la Id de las TCG Card setarray .SKULLTCG_ITEMS[0],29111,50,29112,50,29113,50,29114,50,29115,50,29188,75,29189,75,12903,1,12904,1,12905,1,12906,1,12907,1,12908,1,7959,2,13607,3,7091,1; // Aca pones los items que quieras IdItem,Precio for(set .@i,0; .@i < getarraysize(.TCG_ITEMS); set .@i,.@i+2) { npcshopadditem "SKULLTCG_SHOP",.SKULLTCG_ITEMS[.@i],.SKULLTCG_ITEMS[(.@i+1)]; } } - shop SKULLTCG_SHOP 139,909:1 please help ^^ Quote Link to comment Share on other sites More sharing options...
Stolao Posted May 31, 2015 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: Sunday at 01:58 PM Share Posted May 31, 2015 try using -%TAB%itemshop%TAB%<NPC Name>%TAB%<sprite id>,<costitemid>{:<discount>},<itemid>:<price>{,<itemid>:<price>...} <map name>,<x>,<y>,<facing>%TAB%itemshop%TAB%<NPC Name>%TAB%<sprite id>,<costitemid>{:<discount>},<itemid>:<price>{,<itemid>:<price>...} Quote Link to comment Share on other sites More sharing options...
ItsFree Posted May 31, 2015 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 121 Reputation: 7 Joined: 04/11/15 Last Seen: October 29, 2024 Author Share Posted May 31, 2015 Thx, but how can i use im this case "skull_points" on that script? ^^ Quote Link to comment Share on other sites More sharing options...
Capuche Posted June 3, 2015 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted June 3, 2015 Try -%TAB%pointshop%TAB%<NPC Name>%TAB%<sprite id>,<costvariable>{:<discount>},<itemid>:<price>{,<itemid>:<price>...} <map name>,<x>,<y>,<facing>%TAB%pointshop%TAB%<NPC Name>%TAB%<sprite id>,<costvariable>{:<discount>},<itemid>:<price>{,<itemid>:<price>...} where <costvariable> is your variable name #skull_points Quote Link to comment Share on other sites More sharing options...
ItsFree Posted June 4, 2015 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 121 Reputation: 7 Joined: 04/11/15 Last Seen: October 29, 2024 Author Share Posted June 4, 2015 (edited) now i understand thx ^^ solved <3 ok.... i guess i understand.... but im kinda.... slow i guess.... after i tried to test the script dont load... i got this poring_w02,177,176,5 pointshop Mvp Points Trader 112,#monster_points,116,7539:1 i guess the structure after <costvariable> confuse me :s Edited June 4, 2015 by ItsFree Quote Link to comment Share on other sites More sharing options...
Capuche Posted June 5, 2015 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted June 5, 2015 poring_w02,177,176,5 pointshop Mvp Points Trader 112,#monster_points,7539:1 remove the 116 number (what is it about?) 1 Quote Link to comment Share on other sites More sharing options...
ItsFree Posted June 6, 2015 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 121 Reputation: 7 Joined: 04/11/15 Last Seen: October 29, 2024 Author Share Posted June 6, 2015 solved thx <3 Quote Link to comment Share on other sites More sharing options...
Question
ItsFree
Hi... i've this script:
works but i tried to use this: http://svn.code.sf.net/p/rathena/svn/trunk/npc/custom/quests/quest_shop.txt
but just i can't.... i tried alot of times changing but i cant :C anyone can help me?
i also tried with this.... but the npc doesnt count me the skull_points and neither show me the items...
please help ^^
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.