Jump to content

Erba

Members
  • Posts

    550
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Erba

  1. Hello Rathena,

     

    can someone help me how to script this kind of event?

     

    This is my idea..

     

    The NPC will only give specified items to first 50 players who will be able to talk to it, then once this npc is able to give items to 50 players the NPC will tell players this chat "YOURE TOO LATE SORRY the first 50Players already claimedthe items".

    Announce every name who claimed the item and their IP address ( if possible )

    NPC will Announce that all those first 50 players were able to gain the items.

    One account claim only..

     

    Thank youuuuuu


    bump


    bumpplease

  2. prontera,150,180,5	script	Hunter monster	87,{
    end;
    OnEvent:
    	waitingroom "Mob to hunt: "+ getmonsterinfo( getvariableofnpc( .monster_hunt_id,"atcmd_monsterhunt" ),0 ) + " (ID: " + getvariableofnpc( .monster_hunt_id,"atcmd_monsterhunt" ) + ")",0;
    }
    
    -	script	atcmd_monsterhunt	-1,{
    OnInit:
    	bindatcmd "monsterhunt",strnpcinfo(3)+"::OnCmd";
    	end;
    OnCmd:
    	if ( .monster_hunt_id == 0 && ( .@atcmd_numparameters == 0 || .@atcmd_parameters$[0] == "on" || .@atcmd_parameters$[0] == "off" ) )
    		dispbottom "there is none monster to hunt";
    	else if ( .@atcmd_numparameters == 0 )
    		dispbottom "the new monster to hunt is " + getmonsterinfo( .monster_hunt_id,0 ) + " (ID: " + .monster_hunt_id + ")";
    	else if ( .@atcmd_parameters$[0] == "on" ) {
    		if ( @display_message == 0 )
    			dispbottom "killing a " + getmonsterinfo( .monster_hunt_id,0 ) + " (ID: " + .monster_hunt_id + ") already display a message";
    		else {
    			dispbottom "killing a " + getmonsterinfo( .monster_hunt_id,0 ) + " (ID: " + .monster_hunt_id + ") will display a message";
    			@display_message = 0;
    		}
    	}
    	else if ( .@atcmd_parameters$[0] == "off" ) {
    		if ( @display_message == 1 )
    			dispbottom "killing a " + getmonsterinfo( .monster_hunt_id,0 ) + " (ID: " + .monster_hunt_id + ") already don't display a message";
    		else {
    			dispbottom "killing a " + getmonsterinfo( .monster_hunt_id,0 ) + " (ID: " + .monster_hunt_id + ") won't display a message";
    			@display_message = 1;
    		}
    	}
    	else if ( getgmlevel() >= 25 ) {
    		if ( .@atcmd_parameters$[0] == "0" ) {
    			dispbottom "you stop the hunt";
    			.monster_hunt_id = 0;
    			delwaitingroom "Hunter monster";
    		}
    		else {
    			.@mob_name$ = getmonsterinfo( atoi(.@atcmd_parameters$[0]),0 );
    			if ( .@mob_name$ == "null" )
    				dispbottom "wrong mob id";
    			else {
    				.monster_hunt_id = atoi(.@atcmd_parameters$[0]);
    				dispbottom "the new monster to hunt is "+ .@mob_name$ + " (ID: " + .monster_hunt_id + ")";
    				donpcevent "Hunter monster::OnEvent";
    			}
    		}
    	}
    	else
    		dispbottom "@" + .@atcmd_command$ + " failed. @" + .@atcmd_command$ + " to display the mob to hunt. @" + .@atcmd_command$ + " on/off to display a message killing the mob";
    	end;
    OnNPCKillEvent:
    	if ( .monster_hunt_id == 0 || killedrid != .monster_hunt_id ) end;
    	if ( hunter_points >= 1000 && @display_message == 0 )
    		message strcharinfo(0), "you can exceed 1000 hunters points (you have " + hunter_points + " hunters points)";
    	else if ( hunter_points < 1000 ) {
    		hunter_points++;
    		if ( @display_message == 0 )
    			message strcharinfo(0), "you have now " + hunter_points + " hunters points for killing a " + getmonsterinfo( .monster_hunt_id,0 );
    	}
    	end;
    }
    

     

    thank you sir.. im gonna try this one^^

     

    btw, how can i make the points to be use in a shop?

  3. Requesting a script that requires a player to kill monsters in any maps they wanted..

     

    every time they kill a monster(specified by a gm) they obtain 1 hunting point and only a maximum of 1000 hunting points to be obtain per character

     

    GM automated:

    @monsterhunt

     

    a gm lvl 25 can change the Monster to be killed inorder to obtain poring point

  4. SG LOV and PARRYING:

     

    Go to your trunk/src/map/pc.c and look for:

    	for( i = 0; i < MAX_SKILL; i++ ) {
    		if( sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED && sd->status.skill[i].flag != SKILL_FLAG_PERM_GRANTED ) //Don't touch these
    			sd->status.skill[i].id = 0; //First clear skills.
    		/* permanent skills that must be re-checked */
    		if( sd->status.skill[i].flag == SKILL_FLAG_PERM_GRANTED ) {
    			switch( i ) {
    				case NV_TRICKDEAD:
    					if( (sd->class_&MAPID_UPPERMASK) != MAPID_NOVICE ) {
    							sd->status.skill[i].id = 0;
    							sd->status.skill[i].lv = 0;
    							sd->status.skill[i].flag = SKILL_FLAG_PERMANENT;
    					}
    					break;
    			}
    		}
    	}
    

    Add this Lines below:

    	if( sd->sc.count && sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_STAR)
    		{
    			sd->status.skill[85].id = 85;
    			sd->status.skill[85].lv = 10;
    			sd->status.skill[85].flag = SKILL_FLAG_PERMANENT; 
    			sd->status.skill[356].id = 356;
    			sd->status.skill[356].lv = 10;
    			sd->status.skill[356].flag = SKILL_FLAG_PERMANENT; 
    		} 
    

    LK PARRYING USING 1 Hand:

     

    Look for this at the trunk/src/map/skill.c

    bool skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id, uint16 skill_lv) {
    	struct skill_condition require;
    	struct status_data *status;
    	int i;
    	int index[MAX_SKILL_ITEM_REQUIRE];
    

    Then Add this line below:

    	struct status_change *sc = &sd->sc;
    

    2nd step:

     

    Look for this at trunk/src/map/skill.c:

    if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) {
    

    there are 2 same lines of it and change it to this:

    if( require.weapon && !(pc_check_weapontype(sd,require.weapon) || (skill_id = LK_PARRYING && sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_KNIGHT && sd->status.weapon == W_1HSWORD) || (skill_id = LK_PARRYING && sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_STAR && sd->status.weapon == W_BOOK) ) ){ 
    
  5. make a an skill bmp picture and place it in an texture /item folder

     

    edit skill tree, edi skill lua files

     

    edit src.. specially trunk/src/map/pc.c

     

    search for this:

    skill_get_inf2(i)&(INF2_NPC_SKILL|INF2_GUILD_SKILL) )
    

    there is 2 line for this script

    then remove

    INF2_NPC_SKILL
    
×
×
  • Create New...