Jump to content

luizragna

Members
  • Content Count

    114
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by luizragna


  1. Hello guys. When a kill monster with @mosnter the mod id is added to variable killedrid.

    But when i kill a monster summoned with script command monster he is not added to killedrid.

    monster "pay_dun04",122,123,"[DG] Red Plant",1078,1,strnpcinfo(0)+"::OnBonus";
    	end;
    	
    	OnBonus:
    	
    	mes "Do you killed a monster";
    
    	if (killedrid == 1078){
    			mes "This monster is Red Plant";
    	close2;
    	percentheal 15,0;
    	specialeffect(7, SELF, playerattached());
    	}
    	end;

    In the above example, the script not enter in if (killedrid == 1078). 

    Whats is the problem?? (In the rAthena i not have this problem)


  2. Try now:

    I changed the coin to item ID 26080

    NPC Trader:

    prontera,136,217,4	script	Coin Trader	4_M_MANAGER,{
    
    .@npc$ = "[Coin Trader]"; //NPC Name
    
    mes .@npc$;
    mes "Hello. I'm the Coin Trader";
    mes "I can trade Zeny for Coin and vice versa";
    mes "(1 Coin = 10.000.000z)";
    mes  "What you want trade?";
    next;
    menu "Zeny for Coins",zc,"Coins for Zeny",cz,"Close",cl;
    
    cl:
    close;
    
    zc:
    mes .@npc$;
    mes "How many Coins do you want purchase?";
    mes "(1 Coin = 10.000.000z)";
    input @zc;
    @qnt = @zc*10000000;
    
    if (Zeny - @qnt < 0){
    	
    	mes "Do you not have zeny";
    	close;
    	
    }
    getitem 26080,@zc;
    set Zeny,Zeny - @qnt;
    
    mes " ";
    mes "Thank You!";
    mes "(Now do you have "+countitem(26080)+" Coin(s) )";
    close;
    
    cz:
    mes .@npc$;
    mes "How many Coins  you want sell?";
    mes "Do you have "+countitem(26080)+" Coin(s)";
    mes "(1 Coin = 10.000.000z)";
    input @cz;
    @qnt = @cz*10000000;
    
    if (countitem(26080) - @cz < 0)
    {
    	mes "Do you not have sufficient Coins";
    	close;
    }
    
    if (Zeny + @qnt > 2000000000){
    	
    	
    	mes "Do you can't stay more than 2b Zeny";
    	close;
    	
    }
    delitem 26080,@zc;
    set Zeny,Zeny + @qnt;
    
    mes " ";
    mes "Thank You!";
    mes "(Now do you have "+countitem(26080)+" Coin(s) )";
    close;
    
    }

     

    Coin Shop:

    prontera,141,217,4	script	Coin Shop	4_F_TELEPORTER,{
    
    mes "[Coin Shop]";
    mes "Hello. Why do you want buy with yours Coins?";
    mes "(Do you have "+countitem(26080)+" Coin(s) )";
    
    menu "Red Potion (3 Coins)",rp,"Knife[4] (7 Coins)",kn,"Cancell",cl;
    cl:
    close;
    
    rp:
    if (countitem(26080) - 3 < 0)
    {
    	mes "Do you not have sufficient Coins";
    	close;
    }
    delitem 26080,3;
    getitem 501,1;
    mes " ";
    mes "Thank You!";
    mes "(Now do you have "+countitem(26080)+" Coin(s) )";
    close;
    
    kn:
    if (countitem(26080) - 7 < 0)
    {
    	mes "Do you not have sufficient Coins";
    	close;
    }
    delitem 26080,7;
    getitem 1202,1;
    mes " ";
    mes "Thank You!";
    mes "(Now do you have "+countitem(26080)+" Coin(s) )";
    close;
    
    
    }

     


  3. I maked with variable.

     

    Trader NPC:

    prontera,136,217,4	script	Coin Trader	4_M_MANAGER,{
    
    .@npc$ = "[Coin Trader]"; //NPC Name
    
    mes .@npc$;
    mes "Hello. I'm the Coin Trader";
    mes "I can trade Zeny for Coin and vice versa";
    mes "(1 Coin = 10.000.000z)";
    mes  "What you want trade?";
    next;
    menu "Zeny for Coins",zc,"Coins for Zeny",cz,"Close",cl;
    
    cl:
    close;
    
    zc:
    mes .@npc$;
    mes "How many Coins do you want purchase";
    mes "(1 Coin = 10.000.000z)";
    input @zc;
    @qnt = @zc*10000000;
    
    if (Zeny - @qnt < 0){
    	
    	mes "Do you not have zeny";
    	close;
    	
    }
    set SCoin,SCoin + @zc;
    set Zeny,Zeny - @qnt;
    
    mes " ";
    mes "Thank You!";
    mes "(Now do you have "+SCoin+" Coin(s) )";
    
    
    close;
    
    cz:
    mes .@npc$;
    mes "How many Coins  you want sell?";
    mes "Do you have "+SCoin+" Coin(s)";
    mes "(1 Coin = 10.000.000z)";
    input @cz;
    @qnt = @cz*10000000;
    
    if (SCoin - @cz < 0)
    {
    	mes "Do you not have sufficient Coins";
    	close;
    }
    
    if (Zeny + @qnt > 2000000000){
    	
    	
    	mes "Do you can't stay more than 2b Zeny";
    	close;
    	
    }
    set SCoin,SCoin - @cz;
    set Zeny,Zeny + @qnt;
    
    mes " ";
    mes "Thank You!";
    mes "(Now do you have "+SCoin+" Coin(s) )";
    close;
    
    }

     

    Coin Shop:

    prontera,141,217,4	script	Coin Shop	4_F_TELEPORTER,{
    
    mes "[Coin Shop]";
    mes "Hello. Why do you want buy with yours Coins?";
    mes "(Do you have "+SCoin+" Coin(s) )";
    
    menu "Red Potion (3 Coins)",rp,"Knife[4] (7 Coins)",kn,"Cancell",cl;
    cl:
    close;
    
    rp:
    if (SCoin - 3 < 0)
    {
    	mes "Do you not have sufficient Coins";
    	close;
    }
    SCoin = SCoin - 3;
    getitem 501,1;
    mes " ";
    mes "Thank You!";
    mes "(Now do you have "+SCoin+" Coin(s) )";
    close;
    
    kn:
    if (SCoin - 7 < 0)
    {
    	mes "Do you not have sufficient Coins";
    	close;
    }
    SCoin = SCoin - 7;
    getitem 1202,1;
    mes " ";
    mes "Thank You!";
    mes "(Now do you have "+SCoin+" Coin(s) )";
    close;
    
    
    }

     


  4. Hello guys. The command setunitdata not worked with setunitdata how show bellow example:

    1st Script:

    	set .@amount,1;
    		for (.@i = 0; .@i < .@amount; .@i++) {
    	.@mobGID = monster ("pay_dun04",122,123,"[DG] Planta Vermelha",1078,1,strnpcinfo(0)+"::OnBonus"); //planta vermelha
    		setunitdata .@mobGID,UDT_LEVEL,7;
    		setunitdata .@mobGID,UDT_MAXHP,10;
    		setunitdata .@mobGID,UDT_HP,2;
    		}
    	end;

    2nd script:

    OnNPCKillEvent:
    
    	mes "Do you killed the monster ID: "+killedrid+" ";
    	close;

    The variable killedrid show the last mob that i killed, but if he created with .@mobGID do not add the mobid to variable when i kill.

    (Sorry for my bad English)


  5. 1 hour ago, Slicer said:

    look in data/luafiles514/

    I found in skilleffect/skilleffectinfoslit.lub

    I added:

    	[SKID.DG_SUMMONZOMBIE] = {
    		beginEffectID = EFID.EF_BLUECASTING
    	},

    But the strange is not have all skills of the game


  6. When i use the command:

    menu "Yeees",yes,"Nooo",no;
    
    yes:
    specialeffect(6, SELF, playerattached());
    end;
    
    no:
    end;

    The character stands still and i need use @refresh for him to come back to normal.

     

    I Tried switch but, the problem continues.

     

    I use the last version of Hercules.


  7. Fire Area


    Hello guys!

    This is my first script in the Hercules. Basically, do you receive damage while stay stepping.

    Main configurations: (I'm using the last version of hercules)

    	 //Damage Options:
    	 .DMG_Type = 1;	// Type of damage - [0 - Normal] | [1 - Percentage of maximum health]
    	 .DMG_Attack = 5;	// Damage per attack (1 to 100 if percentage damage)
    	 .DMG_Speed = 250;	// Damage speed. The smaller faster (milisseconds)
    	 .CAN_Die = 0;	// The character can die burned? - [0 - No] | [1 - Yes]
    	 
    	 // Effects:
    	 .DMG_Effect = 49; //When receive damage (Alternatives: 50 , 255 ) Default: 49
    	 .FIRE_Effect = 25; //Flow Effect  (Alternatives: 634 , 728, 920, 962) Default: 25
    	 .EFFECT_Speed = 300; //The speed of loop effect  (Advanced option. Not recommended change):
    	 
    	 //Time Options
    	 .TIME_DURATION_ON = 3000;	// The time that the fire stay enable	(milisseconds)
    	 .TIME_DURATION_OFF = 2000;// The time that the fire stay disable	(milisseconds)
    	 .TIME_Quit = 500;	// Burning time after leave of the danger area, 	(milisseconds)

    Cells configurations:

    //Bellow, do you configure the cells (Do you can add more, if want)
    pay_dun00,161,46,0	duplicate(FireArea)	#FireArea11	HIDDEN_WARP_NPC,0,0
    pay_dun00,161,45,0	duplicate(FireArea)	#FireArea12	HIDDEN_WARP_NPC,0,0
    pay_dun00,161,44,0	duplicate(FireArea)	#FireArea13	HIDDEN_WARP_NPC,0,0
    
    pay_dun00,160,46,0	duplicate(FireArea)	#FireArea21	HIDDEN_WARP_NPC,0,0
    pay_dun00,160,45,0	duplicate(FireArea)	#FireArea22	HIDDEN_WARP_NPC,0,0
    pay_dun00,160,44,0	duplicate(FireArea)	#FireArea23	HIDDEN_WARP_NPC,0,0
    
    pay_dun00,159,46,0	duplicate(FireArea)	#FireArea31	HIDDEN_WARP_NPC,0,0
    pay_dun00,159,45,0	duplicate(FireArea)	#FireArea32	HIDDEN_WARP_NPC,0,0
    pay_dun00,159,44,0	duplicate(FireArea)	#FireArea33	HIDDEN_WARP_NPC,0,0
    
    pay_dun00,158,46,0	duplicate(FireArea)	#FireArea41	HIDDEN_WARP_NPC,0,0
    pay_dun00,158,45,0	duplicate(FireArea)	#FireArea42	HIDDEN_WARP_NPC,0,0
    pay_dun00,158,44,0	duplicate(FireArea)	#FireArea43	HIDDEN_WARP_NPC,0,0

    Sorry for my bad english...

    Enjoy it :B):

    OBS: If do you use @reloadscript in this script, reload your character.


     


  8. Hello guys. I have maked a custom skill. This skill work with that all party members get other skill.

    When use the skill, only he gain the skill Charge Attack (skillid: 1001).

    skill.c

    //When the player use skill:
    pc->skill(sd, 1001, 1, 0); //The player get Charge Attack skill

    I would like that when the player use, all party members get the skill Charge Attack.

    Basically I wanted this command skill to execute for all members.


  9. Hello guys. I have tried make a custom skill that give another skill. I am editing some skills.

    For now, I want to make the ability RK_ENCHANTBLADE give TF_THROWSTONE

    skill.c

    case RK_ENCHANTBLADE:
    	clif->skill_nodamage(src,bl,skill_id,skill_lv,// formula not confirmed
    	sc_start2(src,bl,type,100,skill_lv,(100+20*skill_lv)*status->get_lv(src)/150+sstatus->int_,skill->get_time(skill_id,skill_lv)));
    
    	pc->skill(sd, 152, 1, 0); //Here the TF skill
    
    break;

    i am using how base the script command: *skill <skill id>,<level>{,<flag>};

    From the souce, that in the case i guess pc_skill.

    script.c

    BUILDIN(skill) {
    	int id;
    	int level;
    	int flag = SKILL_GRANT_TEMPORARY;
    	struct map_session_data *sd = script->rid2sd(st);
    	if (sd == NULL)
    		return true;// no player attached, report source
    
    	id = ( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
    	level = script_getnum(st,3);
    	if( script_hasdata(st,4) )
    		flag = script_getnum(st,4);
    	pc->skill(sd, id, level, flag); //<--- The command that i used
    
    	return true;
    }

     

    Even so, I did not gain the skill by using RK_ENCHANTBLADE


  10. Hello guys. I have tried make a custom skill that give another skill. I am editing some skills.

    For now, I want to make the ability RK_ENCHANTBLADE give TF_THROWSTONE

    skill.c

    case RK_ENCHANTBLADE:
    	clif->skill_nodamage(src,bl,skill_id,skill_lv,// formula not confirmed
    	sc_start2(src,bl,type,100,skill_lv,(100+20*skill_lv)*status->get_lv(src)/150+sstatus->int_,skill->get_time(skill_id,skill_lv)));
    
    	pc->skill(sd, 152, 1, 0); //Here the TF skill
    
    break;

    i am using how base the script command: *skill <skill id>,<level>{,<flag>};

    From the souce, that in the case i guess pc_skill.

    script.c

    BUILDIN(skill) {
    	int id;
    	int level;
    	int flag = SKILL_GRANT_TEMPORARY;
    	struct map_session_data *sd = script->rid2sd(st);
    	if (sd == NULL)
    		return true;// no player attached, report source
    
    	id = ( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
    	level = script_getnum(st,3);
    	if( script_hasdata(st,4) )
    		flag = script_getnum(st,4);
    	pc->skill(sd, id, level, flag); //<--- The command that i used
    
    	return true;
    }

     

    Even so, I did not gain the skill by using RK_ENCHANTBLADE

×
×
  • Create New...

Important Information

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