Jump to content

bWolfie

Members
  • Content Count

    848
  • Joined

  • Last visited

  • Days Won

    34

Posts posted by bWolfie


  1. Firstly, you would need to set the mapflag 'loadevent' for your map in question.

    map_name	mapflag	loadevent
    Next, you need to create a script to register the last player on that map using the 'OnPCLoadMapEvent' function.
    -	script	Last Player ID	FAKE_NPC,{
    
    OnPCLoadMapEvent:
    	if (strcharinfo(3) == "map_name") {
    		.@charid = getcharid(3,"" + strcharinfo(0) + "");
    		$last_char_name = " + rid2name(.@charid) + ";
    		end;
    	} else end;
    
    }
    
    The above script asks the following:

    .@charid asks for the charid type 3, which is the Account ID.

    $last_char_name, converts .@charid into a name using the command 'rid2name'.

    Note: rid2name only displays the current online character of that account.

     

    Next you need a script which you'll be able to easily access the above value.

    For this post, we'll use an atcmd using 'bindatcmd'.

     

    All in all, it turns out like this:

    -	script	Last Player ID::last_player_id_001	FAKE_NPC,{
    
    OnPCLoadMapEvent:
    	if (strcharinfo(3) == "prontera") {
    		.@charid = getcharid(3,"" + strcharinfo(0) + "");
    		$last_char_id = .@charid;
    		end;
    	} else end;
    
    OnCommand:
    	.@own_id = getcharid(3,"" + strcharinfo(0) + "");
    	detachrid;
    	attachrid($last_char_id);
    	.@pleb_id = strcharinfo(0);
    	detachrid;
    	attachrid(.@own_id);
    	message strcharinfo(0),"The last player to load map prontera was " + .@pleb_id + ".";
    	end;
    	
    OnInit:
    	bindatcmd "charid","last_player_id_001::OnCommand",96;
    	end;
    }
    
    prontera	mapflag	loadevent
    
    With a level 96 GM or above, you can use the command '@charid' to view the last player who loaded prontera.

    Not sure if this is what you were after!


  2. You need to remove the "Upper: 2" bit.

    Upper type 2 means only rebirth jobs can equip IRRC.

     

    From: http://herc.ws/wiki/Custom_Items

    Normal jobs: 0x01 (1)

    Upper jobs: 0x02 (2)

    Baby jobs: 0x04 (4)

    Third jobs: 0x08 (8)

    Upper Third jobs: 0x10 (16)

    Baby Third jobs: 0x20 (32)

     

    Under pre-re mode third classes are considered upper, making use of

    the 8 and above masks is therefore not necessary unless in renewal

    mode. When no value is specified, all classes (mask 0x3f) are able to

    equip the item.


  3. Not sure how linking works, but hoping this is good enough: http://pastebin.com/uX9uigAu

     

    //===== Hercules Script ======================================
    //== Thirds Freebies =========================================
    //===== By: ==================================================
    //== True Zeal ===============================================
    //===== Description: =========================================
    //== Links for Zeny
    //============================================================
     
    prontera,150,150,3    script    Link 4 Zeny    4_F_ELEPHANT,{
     
        // Set name of npc to that of it's NPC name (Link 4 Zeny)
        .@name$ = "[" + strcharinfo(1) + "]";
       
        // Sets price in zeny
        .price = 100000;
        
        // Sets effect sprite
        .effect = 503;
        
        mes .@name$;
        mes "Would you like to be linked? Costs " + .price + "z.;";
        next;
        switch(select("Yes:No")){
            case 1:
            if (Zeny >= .price) {
                Zeny -= .price;
                skilleffect .effect,0;
                sc_start SC_SOULLINK,350000,5;
                close;
            } else {
                mes .@name$;
                mes "You don't have enough zeny!";
                close;
            }
            break;
            
            case 2:
                close;
            break;
        }
    }
    

  4. ima try this one later sir! thank you!

     

    Sorry, another error.

    Please change

     

    mes "I see you are a " + Class + ",";
    

    to

     

    mes "I see you are a " + jobname(Class) + ",";
    
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.