Jump to content

Missingno

Members
  • Posts

    135
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Missingno

  1.  

     

    Punch this code in after retrieving the desired item ID to be bound:

    // Item IDs that cannot be bound
    setarray .@blacklist[0], 1201, 1207, 2301;
    
    // Check blacklist
    for (.@i = 0; .@i < getarraysize(.@blacklist); .@i++) {
    	if (@inventorylist_id[.@item] == .@blacklist[.@i]) {
    		mes "Sorry, but "+ getitemname(@inventorylist_id[.@item]) +" is blacklisted from being bound.";
    		close;
    	}
    }
    

    Where can i put this code? after OnInit:?

     

     

    Read the red text (above).

  2. Have the same error! just found out that the players name has a SPACE on the beginning of it so it doesn't find it Online. What would be the solution about this hmmm....????

    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).

    • Upvote 1
  3. 
    

    /*=========================================================

    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;

    }

    • Upvote 2
  4. as i said no vice versa . i want something like he will talk and at the end will give the pass. if he meet the requirment of 20points

    Why not take the script and simply remove the reversed transaction? You'd literally comment out two blocks of code. o_o

  5. 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;
    
    }
    
    
  6. it is not working. I set the preset items to 0 and typed the @reward 909 100 Player it says the player was not online. But it was online.

     

    I tries to add the OnWhisperGlobal and PMed npc:reward typing the same commands above and still no luck, 

     

    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).

    • Upvote 1
  7. hi :) im using euphy quest shop how i can merge this script :D Hahaha ^_^

     

    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).

  8. i got problem im using put the script then i got rewardlog schema but still no @reward on my command

     

    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:

    K2PzRGv.png

     

    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.

    • Upvote 1
  9. 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;
    
    }
    
    
  10. That works great, is there a way to make it go per several maps? example: arena and prtg_cas01? I've tried to put "arena" || "prtg_cas01 but isn't working. >.<

     

    Thank you so much!

     

    Add multiple comparisons in the expression:

    if (strcharinfo(3) != "arena" || strcharinfo(3) != "prtg_cas01") end;
    
  11. 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.

  12. 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,{
    
  13. huh i believe there was an option to turn off when you want to notice that you got or dropped an item o:!

    12270,Cold_Medicine,Cold Medicine,11,20,,10,,,,,0xFFFFFFFF,7,2,,,50,,,{ percentheal 25,25; },{},{}
    

     

    This is true, but players shouldn't be forced to turn off all pick messages just because one item is spamming their message log.


     

    I think i should say Thank You.... This helped me a lot Euphy and Missingno ~

     

    lol

     

    You're very welcome!

  14. may i ask, why not just this?

    12270,Cold_Medicine,Cold Medicine,0,20,,10,,,,,0xFFFFFFFF,7,2,,,50,,,{ percentheal 25,25; specialeffect2 EF_HEAL; getitem 12270,1;},{},{}

    so at the end, the item is not "decreasing" ?

     

    just asking o:!

     

    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.).

  15. 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).

    • Upvote 2
  16.  

    i use a similar script like the one you request o:

     

    you can set up the prize and how many times you want them to click it

     

    you can too set how many prizes of the specified item they can get (like 3 tcg carrd and so on)

     

    gm setup

     

    also info is included

     

    pretty complete script o: 

     

    credits to Leertaste (dunno who is, but thanks lol)

    //===== rAthena Script =======================================
    //= Domination Event
    //===== By: ==================================================
    //= Leertaste
    //===== Current Version: =====================================
    //= 1.0a
    //===== Compatible With: =====================================
    //= Every eAthena or rAthena Version
    //===== Description: =========================================
    //= Automated Event where every click from every char
    //= increases the Number by 1 (+1)
    //= The winner is who increases the Number to the max. (for example 1000)
    //===== Comments: ============================================
    //= This Event is automated but can be started from InGame too
    //= Price/Amount and Amount-to-click is also settable from InGame
    //= Change (if(getgmlevel() > 60)) // 60 to the wished GM-Level for Setups
    //============================================================
    //===== Changelog: ===========================================
    //= -1.0a - Addet Current Variables when changing Price/Amount
    //=	  - Addet Effects to Show Member which Npc is meant
    //=	  - Addet Ingame Menupoint (For Admin) to edit required manage GM-Level
    //=	  - Addet Auto protect from Input 0 (Amount/GM Level)
    //=	  - Changed NPC ID cause of annoying noise
    //=	  - Fixed Bug that comes through Npctalk (changed to Announce)
    //=
    //= -1.0  Finshed Scripting
    //============================================================
    
    turbo_room,107,94,4	script	[Domination]	403,{
    
    if ($@domination_start == 1) {
    			set .dom_click,.dom_click+1;
    			//announce "Click numero: ["+.dom_click+"]",bc_map|bc_blue;
    			specialeffect2 2;
    			if (.dom_click == $@domination_amount) {
    				announce "[Domination]: " + strcharinfo(0) + " ha ganado el juego!",bc_all;
    				set .dom_click,0;
    				set $@domination_start,0;
    				getitem $prize_id_dom, $prize_amount_dom;
    				end;
    		}
    			}else{
    
    set .name$, "[Domination]";
    set .menu$, "Times:Information:What's the Amount?:What's the Price?:Leave";
    //if(getgmlevel() > $GM_Dom-1) set .menu$, .menu$ + ":^008000Set Amount ^ff0000[GM]:^008000Set Price ^ff0000[GM]:^008000Start Event ^ff0000[GM]^000000";
    if(getgmlevel() > 1) set .menu$, .menu$ + ":^008000Set Amount ^ff0000[GM]:^008000Set Price ^ff0000[GM]:^008000Start Event ^ff0000[GM]^000000";
    if(getgmlevel() > 99) set .menu$, .menu$ + ":^008000Set GM Level ^ff0000[ADMIN]^000000";
    
    	mes .name$;
    	mes "What do you want?";
    	next;
    h_menu:
    switch(select(.menu$))	{
    	case 1:
    	mes .name$;
    	mes "^ff0000Domination^000000 starts each day at:";
    	mes "^00800014:30^000000, ^00800017:30^000000 and ^00800020:30^000000 o'clock.";
    	next;
    	mes .name$;
    	mes "What else?";
    	next;
    	goto h_menu;
    
    	case 2:
    	mes .name$;
    	mes "^ff0000Domination^000000";
    	mes "Is a game where you need";
    	mes "to click the Number up to:";
    	mes " -- ^ff0000"+$@domination_amount+"^000000 --";
    	next;
    	mes .name$;
    	mes "Every click (from everybody)";
    	mes "will increase the Number by 1";
    	next;
    	mes .name$;
    	mes "To win you will need to have";
    	mes "the last click to increase the";
    	mes "Number up to the set amount";
    	mes "(-- ^ff0000"+$@domination_amount+"^000000 --)";
    	next;
    	mes .name$;
    	mes "What else?";
    	next;
    	goto h_menu;
    
    	case 3:
    	mes .name$;
    	mes "The amount to click is:";
    	mes " -- ^ff0000"+$@domination_amount+"^000000 --";
    	next;
    	mes .name$;
    	mes "What else?";
    	next;
    	goto h_menu;
    
    	case 4:
    	mes .name$;
    	mes "The Price is:";
    	mes " -- ^ff0000"+$prize_amount_dom+" ^008000"+getitemname($prize_id_dom)+"^000000 --";
    	next;
    	mes .name$;
    	mes "What else?";
    	next;
    	goto h_menu;
    
    	case 5:
    	mes .name$;
    	mes "Have a nice day.";
    	close;
    
    	case 6:							// Setting the Amount to click
    	mes .name$;
    	mes "Enter the Amount which";
    	mes "is needed to reach:";
    	mes " ";
    	mes "Current is:";
    	mes " -- ^ff0000"+$@domination_amount+"^000000 --";
    	input $@domination_amount;
    if ($@domination_amount == 0){
    	next;
    	mes .name$;
    	mes "I think it's not a good idea put";
    	mes "this to 0 because there will be no ending";
    	mes " -- ^ff0000Automatically set to 500^000000 --";
    	set $@domination_amount,500;
    }
    	next;
    	mes .name$;
    	mes "The amount to click is now:";
    	mes " -- ^ff0000"+$@domination_amount+"^000000 --";
    	next;
    	mes .name$;
    	mes "What else?";
    	next;
    	goto h_menu;
    
    	case 7:							// Setting the Price
    	mes .name$;
    	mes "Enter the Item ID of the Price:";
    	mes " ";
    	mes "Current is:";
    	mes " -- ^ff0000"+$prize_id_dom+"^000000 --";
    	mes "(^008000"+getitemname($prize_id_dom)+"^000000)";
    	input $prize_id_dom;
    	next;
    	mes .name$;
    	mes "Now enter the Amount of items the winner will recieve:";
    	mes " ";
    	mes "Current is:";
    	mes " -- ^ff0000"+$prize_amount_dom+"^000000 -- ^008000"+getitemname($prize_id_dom)+"^000000 --";
    	input $prize_amount_dom;
    	next;
    	mes .name$;
    	mes "The Price ID is: ^ff0000"+$prize_id_dom+"^000000";
    	mes "The Amount is: ^ff0000"+$prize_amount_dom+"^000000.";
    	mes " ";
    	mes " -- ^ff0000"+$prize_amount_dom+" ^008000"+getitemname($prize_id_dom)+"^000000 --";
    	next;
    	mes .name$;
    	mes "What else?";
    	next;
    	goto h_menu;
    
    	case 8:
    	sleep2 100;
    	close2;
    	goto l_start;
    	end;
    
    	case 9:
    	mes .name$;
    	mes "Enter the required GM Level";
    	mes "to manage this Event.";
    	mes " ";
    	mes "Current is:";
    	mes " -- ^ff0000"+$GM_Dom+"^000000 --";
    	input $GM_Dom;
    if ($GM_Dom == 0){
    	next;
    	mes .name$;
    	mes "I think it's not a good idea let";
    	mes "GM Level 0 manage this event.";
    	mes " -- ^ff0000Automatically set to 60^000000 --";
    	set $GM_Dom,60;
    }
    	next;
    	mes .name$;
    	mes "GM Level = ^ff0000"+$GM_Dom+"^000000";
    	mes "can now manage this event.";
    	next;
    	mes .name$;
    	mes "What else?";
    	next;
    	goto h_menu;
    
    //OnClock1430:
    //OnClock1730:
    //OnClock2030:
    l_start:
    	announce "[Domination]: Carrera de click esta apunto de comenzar en Zona Evento!!",bc_all;
    	specialeffect 12, SELF;
    	sleep2 30000;
    	announce "[Domination]: El evento de Carrera de click comenzara en 30 segundos!",bc_all;
    	specialeffect 12, SELF;
    	sleep2 25000;
    	announce "[Domination]: Preparense, solo quedan 5 segundos!",bc_all;
    	specialeffect 12, SELF;
    	sleep2 1000;
    	announce "[Domination]: 4!",bc_all;
    	specialeffect 12, SELF;
    	sleep2 1000;
    	announce "[Domination]: 3!",bc_all;
    	specialeffect 12, SELF;
    	sleep2 1000;
    	announce "[Domination]: 2!",bc_all;
    	specialeffect 12, SELF;
    	sleep2 1000;
    	announce "[Domination]: 1!",bc_all;
    	specialeffect 12, SELF;
    	sleep2 1000;
    	announce "Listo! Denme click tantas veces puedan!",bc_all;
    	set $@domination_start,1;
    	end;
    
    	}
    		}
    }
    

     

     

    In this case, he could change the variable @total_clicks in my script to .total_clicks and make it a (simple) game lol:

    prontera,155,181,5	script	Click Me!::clickme	757,{
     
    		// Increase click count
    		.total_clicks++;
    		
    		// Receive prize if max clicks reached
    		if (.total_clicks == .max_clicks) {
    			message strcharinfo(0), "You have received "+ .amount +" "+ getitemname(.prize_id) +".";
    			getitem .prize_id, .amount;
    			.total_clicks = 0;
    			
    		// Display click count
    		} else {
    			message strcharinfo(0), "I have been clicked "+ .total_clicks +" times.";
    		}
    		
    		end;
    		
    		
    		OnInit:
    			// Configuration
    			.max_clicks = 100;
    			.prize_id = 909;
    			.amount = 1;
    			end;
     
    }
     
    
  17. Type 11 runs the script and won't consume the item if an "itemskill" command isn't issued. As it was written, this is the correct entry:

    12270,Cold_Medicine,Cold Medicine,11,20,,10,,,,,0xFFFFFFFF,7,2,,,50,,,{ percentheal 25,25; },{},{}
    



    It does in fact heal, but a healing effect is not shown. Add this to the item script if you want the special effect:
    specialeffect2 EF_HEAL;
    


    Tested just a moment ago; if this isn't working for you, try it on a fresh copy of rAthena.

     

    *Moved to Database Requests

×
×
  • Create New...