Jump to content

Haruka Mayumi

Members
  • Posts

    477
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by Haruka Mayumi

  1. You must declare the shop first because on the script. it read the V4P manager first and run the OnInit first.. although its okay if you use @reloadscript to show the items. but its not the case on @reloadnpcfile. - shop votepoints_shop -1,512:-1 vip_lounge,140,243,4 script V4P Manager 62,{ function getPoints; set .@n$, "[VFP Manager]"; set .@settings, 1; // 0 = item, 1 = shop set .@itemReward, 501; // if settings is set to item set .@convertRate, 2; // 2 Vote Points for 1 Red Potion set .vp, getPoints(getcharid(3)); switch (.@settings) { case 0: mes .@n$; mes "Would you like to convert your "+ .vp +" Vote Points?"; mes "^ff0000The current convert rate is "+ .@convertRate +" Vote Points for 1 "+ getitemname(.@itemReward) +"."; next; menu "Yes", L_Convert, "No", -; mes .@n$; mes "Bye, then."; break; case 1: mes .@n$; mes "You have ^ff0000"+ .vp +"^000000 Vote Points."; mes "Would you like to go shopping?"; next; menu "Yes", -, "No", L_Goodbye; mes .@n$; mes "Have fun shopping!"; callshop "votepoints_shop",1; npcshopattach "votepoints_shop"; end; } L_Goodbye: mes .@n$; mes "Goodbye, then."; close; L_Convert: if (.vp < .@convertRate) goto L_VotePointsTooLow; mes .@n$; mes "How much Vote Points would you like to convert?"; next; menu "All", L_ConvertAll, "Input Amount", L_ConvertAmount; L_ConvertAmount: input .@convert; if (.@convert > .vp) goto L_VotePointsTooLow; set .vp, ((.vp - .@convert) + (.@convert % .@convertRate)); set .@convert, (.@convert / .@convertRate); getitem .@itemReward, .@convert; query_sql("UPDATE cp_createlog SET votepoints = "+ .vp +" WHERE account_id = "+ getcharid(3)); mes .@n$; mes "You have received "+ .@convert +"x "+ getitemname(.@itemReward) +"."; mes "Your current Vote Points is "+ .vp; close; L_ConvertAll: set .@convert, (.vp / .@convertRate); set .vp, (.vp % .@convertRate); getitem .@itemReward, .@convert; query_sql("UPDATE cp_createlog SET votepoints = "+ .vp +" WHERE account_id = "+ getcharid(3)); mes .@n$; mes "You have received "+ .@convert +"x "+ getitemname(.@itemReward) +"."; mes "Your current Vote Points is "+ .vp; close; L_VotePointsTooLow: mes .@n$; mes "Your Vote Points is too low. Come back when you have the minimum amount of Vote Points."; close; function getPoints { set .@account_id, getarg(0); set .@count, query_sql("SELECT votepoints FROM cp_createlog WHERE account_id = "+ .@account_id, .@votepoints); return .@count ? .@votepoints : 0; } OnBuyItem: set .@cost,0; for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1) for(set .@j,0; .@j<getarraysize(.itemShop); set .@j,.@j+2) if (@bought_nameid[.@i] == .itemShop[.@j]) { set .@cost, .@cost+(.itemShop[.@j+1]*@bought_quantity[.@i]); break; } mes .@n$; if (.@cost > .vp) mes "You don't have enough Vote Points."; else { for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1) { getitem @bought_nameid[.@i], @bought_quantity[.@i]; dispbottom "Purchased "+@bought_quantity[.@i]+"x "+getitemname(@bought_nameid[.@i])+"."; } set .vp, .vp - .@cost; query_sql("UPDATE cp_createlog SET votepoints = votepoints - "+ .@cost +" WHERE account_id = "+ getcharid(3)); mes .@n$; mes "Deal completed."; mes "You now have ^ff0000"+ .vp +"^000000 Vote Points."; emotion et_money; } set .@cost,0; deletearray @bought_nameid[0], getarraysize(@bought_nameid); deletearray @bought_quantity[0], getarraysize(@bought_quantity); close; OnInit: setarray .itemShop[0], 501,2,607,5; // <ITEM_ID>,<PRICE>,... npcshopdelitem "votepoints_shop",512; for(set .@i, 0; .@i < getarraysize(.itemShop); set .@i, .@i+2) npcshopadditem "votepoints_shop", .itemShop[.@i], .itemShop[.@i+1]; end; }
  2. it seems like all the headgear doesnt have sprite?.. then the problem might be in accname and accessoryid there might be typos inserted.
  3. https://github.com/rathena/rathena/issues/2127
  4. query_sql for card effect bonus_script .@query_variable$,<duration>{,<flag>{,<type>{,<status_icon>{,<char_id>}}}};
  5. It's very interesting that he is looking for a cheat from a ragnarok developing forum where the developers doing their best to track and fix bugs and make the game fair. rofl
  6. if(Zeny < 1000000) { should be greater than if(Zeny > 1000000) {
  7. setcell walkable then Create 4 mobs(barricade) must have event label then once they died, you can setcell again the walkable path..
  8. it has an outdated query. right now its just a warning. but in the future it will be an error ?
  9. Ohh.. maybe if someone can create this.. i wonder if it they will ask for pull request. EDIT: i had time right now. so i made it. I wonder if i got what's on your mind. maybe create an state too? (sd->state.gainzeny)? nozeny_flag.diff
  10. you should insert the script if you want some help.. and as i can see, there's no @joinevent bindcommand. it should have something like this OnJoinEvent: warp "eventmap",x,y; end; OnInit: bindatcmd "joinevent","Event::OnJoinEvent"; end; you should have asked @crazyarashi since he made this script.. he has the best script compatible for this one. but here, you can save and load this.. there might be some inconsistencies. - script joinevent -1,{ OnJoinEvent: if($dice_enter) warp "quiz_01",204,92; else if($poring_enter) warp "poring_c01",100,100; end; OnInit: bindatcmd "joinevent","joinevent::OnJoinEvent"; end; }
  11. OnInit: while(1){ delwaitingroom; waitingroom "PvP Arena ["+getmapusers("pvproom")+"]",0; sleep 1000; } end; Here's another way. if ever you are already using timer on your script. ^_~
  12. gtb_sc_immunity in item.conf is for blocking buffs/debuffs. when bonus bNoMagicDamage is higher than the gtb_sc_immunity. you should change the golden thief bug card script from bonus bNoMagicDamage,100; to bonus bNoMagicDamage,50;(50 %) since the default of gtb_sc_immunity is 40. dispels wont work against you because the bNoMagicDamage is higher than 40. changing the item script to 35 would allow players to dispel you and at the same time, less magic resistance.
  13. skill.cpp Remove SCCB_CHEM_PROTECT case 3: // THE HIGH PRIESTESS - all buffs removed { status_change_clear_buffs(target, SCCB_BUFFS | SCCB_CHEM_PROTECT); break; } should look like this case 3: // THE HIGH PRIESTESS - all buffs removed { status_change_clear_buffs(target, SCCB_BUFFS ); break; }
  14. skill_db.txt // 0x00010 - skill that could hit emperium
  15. if (getmapusers("quiz_02") > 1) { to if (getmapusers("quiz_02") <= 1) {
  16. something like this? https://streamable.com/0dfi9 you can contact @Functor for this. ^_~
  17. you could use addtimer when they entered the map ^_~
  18. This is my way of doing this. - script goldroom -1,{ OnGoldKilled: sleep 1500; //Respawn time 1000 = second .@mc = getmapunits(BL_MOB,"jupe_ele"); //Mob Count .@pc = getmapunits(BL_PC,"jupe_ele"); //Player Count for(.@i=0;.@i<getarraysize(.setting);.@i+=2) if(.@pc >= .setting[.@i]) .@summon = .setting[.@i+1]; if(!.@summon && .@mc <= .initial) monster "jupe_ele",0,0,"GOLD MOB",1002,1,strnpcinfo(0)+"::OnGoldKilled"; else monster "jupe_ele",0,0,"GOLD MOB",1002,(.@summon-.@mc)+1,strnpcinfo(0)+"::OnGoldKilled"; end; OnInit: .initial = 50; //Normal Mob Count setarray .setting[0],5,100,10,150,15,200; //Player Count, Mob Count{,PC, MC) (5 player = 100 monster, 10 Player = 150 monster.. etc..) monster "jupe_ele",0,0,"GOLD MOB",1002,.initial,strnpcinfo(0)+"::OnGoldKilled"; end; }
  19. *getmapunits *getmapusers *OnPCLoadMapEvent *initnpctimer; add some "OnMyMobDead" label on *monster. you can use any of this combinations to do what you want.
  20. Yes you can do it that way. it's just that. you need to patch everytime you want to add a sealed item[New Sealed Item].. add it on item_trade.txt.. Beelzebub is the example but it seems like you will be sealing other items(equips/useable/misc).. I'll try to make a source of this and probably sell it here. Since this is a good idea. ^_~ Maintaining an Equip Random Option or Card would be good since you will sell it. *seal and *unseal script command might be a good idea.
  21. Lmao. ? probably some script(OnPCKillEvent:).
  22. i don't quite understand what you want. 1. If you want the player that wants to enter pvp to disable the announce when he enters. OR 2. if you want the player to disable the announce when someone enters pvp so he wont see it. 1. is possible through script. 2. is yes possible with script using addrid(0); then use if(), but this won't trigger to players that are currently talking to NPC's. and this is not really recommended. My recommendation is tweak a little on clif.cpp ^_~
  23. This need a source edit. wherein the item will have crafted name "SEALED" on it or they can make another Attribute(not-broken, broken, sealed) well lot of things can do it.. You can go to source request and ask if someone can make it for free. if i would make this one. i wont be doing it for free. ^_~
×
×
  • Create New...