Jump to content

Missingno

Members
  • Posts

    135
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Missingno

  1. Where can i put this code? after OnInit:? Read the red text (above).
  2. I doubt the space in the beginning of the name for the query was intentional, but I'll look into a solution for a name query with a space in the beginning of the name (though honestly, players shouldn't be allowed to have spaces in the beginning of their name).
  3. Add this line under OnPCLoginEvent: .@map$ = strcharinfo(3); If for some reason you're using eAthena, use this instead: set .@map$, strcharinfo(3);
  4. You'll have to convert all variable declarations to use the set command. This script works as intended for rAthena emulators.
  5. Remove the close; command from your OnNPCKillEvent label; it is being used without a message dialogue, subsequently throwing the error. A more suitable command would be end;.
  6. See the documentation for monster: http://rathena.org/wiki/Monster To add a respawn timer, just add sleep2 to the monster's event label before spawning a new one.
  7. /*========================================================= Points to Item Exchanger by Mumbles =========================================================== Request: http://goo.gl/MplDtF =========================================================== Preview: =========================================================== Description: Exchanges items for points and vice-versa at a fixed rate. =========================================================== Compatibility: Optimised for rAthena emulators. =========================================================== Changelog: v1.0 - First version. v1.0.1 - Added changelog. v1.0.2 - Removed reverse transactions. [Missingno] v1.0.3 - Adjusted rates. [Missingno] v1.1 - Compatibilised for rAthena emulators. [Missingno] =========================================================*/ prontera,164,169,3 script Point Exchanger::points2item 871,{ /*----------------------------------------------------- Script -----------------------------------------------------*/ mes .npc_name$; mes "Hello there, ^FF8800"+ strcharinfo(0) +"^000000! "+ "Would you exchange your "+ .points_name$ +" "+ "for "+ .pod_name$ +"?"; mes " "; mes "Exchange Rate: "+ .rate +":1"; mes .points_name$ +": [^FF0000"+ getd(.points_var$) +"^000000]"; next; switch (select(implode(.menu_options$, ":"))) { case 1: mes .npc_name$; mes "Okay, come back if you change your mind!"; break; case 2: mes .npc_name$; mes "Please enter the amount of "+ .points_name$ +" that you want to exchange."; do { mes " "; mes "Input ^0000FF0^000000 to cancel."; next; input .@amount; .@total = .@amount / .rate; // Check break input if (!.@amount) { message strcharinfo(0), strnpcinfo(1) +" : Exchange terminated."; close; } // Check amount against points if (getd(.points_var$) < .@amount) { mes .npc_name$; mes "^FF0000Please enter a valid amount.^000000"; } } while (getd(.points_var$) < .@amount); // Check weight if (!checkweight(.pod_id, .@total)) { mes .npc_name$; mes "^FF0000You're overweight; please store some items.^000000"; break; } setd .points_var$, getd(.points_var$) - .@amount; getitem .pod_id, .@total; mes .npc_name$; mes "You've exchanged "+ .@amount +" "+ .points_name$ +" for "+ .@total +" "+ .pod_name$ +". "+ "You now have "+ getd(.points_var$) +" "+ .points_name$ +" and "+ countitem(.pod_id) +" "+ .pod_name$ +"."; break; } close; /*----------------------------------------------------- Configuration -----------------------------------------------------*/ OnInit: .npc_name$ = "[^0000FFPoint Exchanger^000000]"; .rate = 20; // Exchange rate (rate = 1 PoDs) .pod_id = 7350; // Proof of Donation item ID or constant .pod_name$ = getitemname(.pod_id) +"(s)"; // Proof of Donation item name .points_name$ = "Cash Point(s)"; // Points name .points_var$ = "#CASHPOINTS"; // Points variable // Modifying these options requires updates to the corresponding case setarray .menu_options$[0], "^FF0000>^000000 Cancel", "^0000FF>^000000 Exchange "+ .points_name$ +" for "+ .pod_name$; end; }
  8. Why not take the script and simply remove the reversed transaction? You'd literally comment out two blocks of code. o_o
  9. He means to say change these lines: menu "Yes, I have those SHITS!!",-,"No, I'm starting to gather it"; Into this: menu "Yes, I have those SHITS!!",-,"No, I'm starting to gather it",No;
  10. Here's a useful script from another board that would suit your needs (with a little tweaking for compatibility): Points to Item Exchanger
  11. Give this a try (automated): - script max_lv 99,{ // Configuration OnInit: .max_base = 150; .max_job = 70; .item_id = 501; .amount = 1; end; // Script OnPCBaseLvUpEvent: OnPCJobLvUpEvent: // Determine if Base Level and Job Level are max if (BaseLevel == .max_base && JobLevel == .max_job) { // Receive reward getitem .item_id, .amount; // Display confirmation message message strcharinfo(0), "Congratulations! You have received "+ .amount +" "+ getitemname(.item_id) +" for reaching the max level!"; } end; }
  12. If you're running rAthena, you should be able to simply load the script and execute the command. Make sure you run the SQL query as well; I just tested this again to ensure its functionality, and it works fine. Note that if you've previously loaded this script into your server with @loadnpc, you'll have to unload it before loading it again (@unloadnpc reward).
  13. The way I've written it, you can literally inject each section of code into your script. Place the configuration section under your script's OnInit label, and the item check at the beginning of the script (under the header).
  14. Load the script and initialise the settings; since you're using eAthena, You'll have to modify the code a bit. Add this to line 35: OnWhisperGlobal: The final result should look like this: Then, whisper anything to npc:reward to initialise the settings. Note that you will not see @reward in your @commands list, since it was created via script.
  15. Then they are either offline or the name was misspelled.
  16. Give this a try. See lines 21+ for configuration settings. I've left comments to briefly explain what each section of code does. prontera,150,150,5 script Test NPC 999,{ // Script mes .npc_name$; // Loop through item IDs for (.@i = 0; .@i < getarraysize(.item_id); .@i++) { // Check if current item is equipped if (isequipped(.item_id[.@i])) { // Display message if item is equipped mes "Hey, nice "+ getitemname(.item_id[.@i]) +"!"; close; } } // Display if no items are equipped mes "Huh, what do you want? Get lost!"; close; // Configuration OnInit: // NPC name .npc_name$ = "[Test NPC]"; // Item IDs to speak to NPC setarray .item_id[0], 5102, // Blank Eyes 5751, // Minstrel Song Hat 5138, // Magic Eyes 5383, // Hunter's Cap 5395, // Striped Hat 5308; // Brazil National Flag Hat end; }
  17. Add multiple comparisons in the expression: if (strcharinfo(3) != "arena" || strcharinfo(3) != "prtg_cas01") end;
  18. Here's a sample of what you've described: - script joinevent -1,{ // Configuration OnInit: // Map settings .map_name$ = "payon"; .map_x = 20; .map_y = 20; // Command bindatcmd "joinevent", strnpcinfo(3) +"::OnCommand"; end; // Script OnCommand: // Confirm warp if (select("Warp to event area:End session") != 2) { // Warp to preset destination warp .map_name$, .map_x, .map_y; end; } close; } ...though I would probably just go without the confirmation, since the implementation is via atcommand: - script joinevent -1,{ // Configuration OnInit: // Map settings .map_name$ = "payon"; .map_x = 20; .map_y = 20; // Command bindatcmd "joinevent", strnpcinfo(3) +"::OnCommand"; end; // Script OnCommand: // Warp to preset destination warp .map_name$, .map_x, .map_y; end; close; } I've left some comments so you can get an idea of what each section of code does.
  19. Here's a sample script and an explanation of what it does: prontera,50,50,0 script basc_area -1,10,10,{ OnTouchNPC: unitwarp "this", -1, -1; end; } When a non-player character (monster) enters a 10 by 10 rectangular cell area around (50, 50) in the map prontera, warp the unit to a random position on this map. Modify this line to adjust the starting position and cell area: prontera,50,50,0 script basc_area -1,10,10,{
  20. You can use party_delmember to remove a player from a party or party_destroy to delete the party altogether.
  21. This is true, but players shouldn't be forced to turn off all pick messages just because one item is spamming their message log. You're very welcome!
  22. Type 11 items are not consumed unless an "itemskill" command is issued when used; they simply stay in your inventory. Your method is a nice workaround, if you disregard the message displayed every time the item is consumed (example: You got 1 Infinite Fly Wing. You got 1 Infinite Fly Wing. You got 1 Infinite Fly Wing.) and the risk of item loss (example: Player has autoloot enabled and becomes overweight or exceeds inventory capacity; You dropped 1 Infinite Fly Wing.).
  23. Read our Wiki article about areamonster. Syntax: areamonster <"map name">, <x1>, <y1>, <x2>, <y2>, <"display name">, <mob id>, <amount>[, <"event label">]; Example: areamonster "prt_fild08", 50, 50, 100, 100, "Poring", 1002, 10, strnpcinfo(3) +"::OnPoringDeath"; Spawn 10 Poring (1002) named "Poring" in a rectangular area between coordinates 50, 50 and 100, 100 on the map "prt_fild08". When it is killed, run the event label "OnPoringDeath" in (this NPC name).
×
×
  • Create New...