Jump to content

Angelmelody

Members
  • Content Count

    772
  • Joined

  • Last visited

  • Days Won

    23

Posts posted by Angelmelody


  1. where is ownladder and other table, i think this script have 3 table, are not ?

     

    I think there are only 2 tables required

     

    you can search  'query_sql' to check how many tables she used

     

    CREATE TABLE IF NOT EXISTS `pvpladder` (char_id int(11) not null default '0' primary key,name varchar(30) not null default '',streaks smallint(6) unsigned not null default '0',kills smallint(6) unsigned not null default '0',deaths smallint(6) unsigned not null default '0',streaktime datetime) engine = myisam;CREATE TABLE IF NOT EXISTS `ownladder` (guild_id int(11) not null default '0' primary key,name varchar(24) not null default '',currentown smallint(6) unsigned not null default '0',highestown smallint(6) unsigned not null default '0',owntime datetime) engine = myisam;

  2. Have you ever thought about those characters were the other country's charset not installed in your OS ?

     

    I have ever experienced this kind of issues , if player use Japanese characters I cant see his/her name.


  3. @Mumbles whats the difference with the temporary ones?

     

    and can you tell me how do i use them with mes ""; lines.

     

    prontera,151,189,5    script    example    100,{	mes "-------"+.npcname$+"-------";	mes "123456789abcdefgh........";	close;OnInit:	.npcname$ = strnpcinfo(1);end;}

  4.  

     

    try this

     

    -	script	asdf1234	-1,{end;OnPCDieEvent:	set .@pid,getcharid(1);	if(!.@pid) end;	set .@daid,getcharid(3);	if(getpartyleader(.@pid,1)== .@daid ) {		getpartymember getcharid(1),2;		for(set .@i,0;.@i<$@partymembercount;set .@i,.@i+1) {			if($@partymemberaid[.@i]==.@daid) continue;			if(attachrid($@partymemberaid[.@i])) 				message strcharinfo(0), "Your party leader is dead!";		}	}end;}

     

     

    Hello,

     

    Im trying to add it here. can you help me.

     

    if ( GetPartyLeader(getcharid(1),2) == getcharid(0)) {		mes "Sorry, I cant warp you. You are the party leader.";	}else if( !isloggedin( .@party_leader_aid,.@party_leader_cid ) ){		mes "Party Leader not online...";	}else if( strcharinfo(3) == .@party_leader_map$ ){		mes "Both of you at same map.";	}else if( !Hp ){		mes "Your party leader is dead. I can't warp you there.";

     

    Thank you!

     

    try to change this line

    }else if( !Hp ){

    to

    } else if(set(.@tempaid,getcharid(3)) && attachrid(GetPartyLeader(getcharid(1),1)) && !Hp && attachrid(.@tempaid) ) {


  5. try this

     

    -	script	asdf1234	-1,{end;OnPCDieEvent:	set .@pid,getcharid(1);	if(!.@pid) end;	set .@daid,getcharid(3);	if(getpartyleader(.@pid,1)== .@daid ) {		getpartymember getcharid(1),2;		for(set .@i,0;.@i<$@partymembercount;set .@i,.@i+1) {			if($@partymemberaid[.@i]==.@daid) continue;			if(attachrid($@partymemberaid[.@i])) 				message strcharinfo(0), "Your party leader is dead!";		}	}end;}

  6. in my option , I would add an option to show mob's hp barbattle.c{ "show_mob_info",     &battle_config.show_mob_info,   0,    0,   1|2|4|8, }  

    conf/battle/monster.conf

     

    // Display some mob info next to their name? (add as needed)
    // (does not works on guardian or Emperium)
    // 1: Display mob HP (Hp/MaxHp format)
    // 2: Display mob HP (Percent of full life format)
    // 4: Display mob's level
    // 8:Display mob's HP bar
    show_mob_info: 1

     

     

    in mob.c

     

    if(battle_config.show_mob_info&8) {

     

      show pink hp bar.....

    }


  7.  

     

     

     

    how do i enable broadcast message on group user player 2?

    what does 'group user player 2' mean? Super Player?

     

    yes  :D

     

        query_sql("SELECT account_id FROM `login` WHERE group_id=2" ,.@g2aid);    .@size = getarraysize(.@g2aid);    for(.@i=0;.@i<.@size;.@i++) {        if (attachrid(.@g2aid[.@i]))            announce "blah blah........",bc_blue|bc_self;            }

    where do i put this code?  :o

      in your broadcast npc


  8.  

     

    how do i enable broadcast message on group user player 2?

    what does 'group user player 2' mean? Super Player?

     

    yes  :D

     

        query_sql("SELECT account_id FROM `login` WHERE group_id=2" ,.@g2aid);    .@size = getarraysize(.@g2aid);    for(.@i=0;.@i<.@size;.@i++) {        if (attachrid(.@g2aid[.@i]))            announce "blah blah........",bc_blue|bc_self;            }

  9. the below Code Snippet is dangerous , after submitting the select option,

     

    script should ValidateCost again

                            if( select( "^0000FFPurchase^000000:Cancel" ) == 1 ){                                if( getitemname( atoi( @Currency$ ) ) != "null" )                                        delitem atoi( @Currency$ ),@TotalCost;                                else{                                        set getd( @Currency$ ),getd( @Currency$ ) - @TotalCost;                                }                                for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1)                                        getitem @bought_nameid[@i],@bought_quantity[@i];                                //message strcharinfo(0),"Received "+getarraysize( @bought_nameid )+" Items.";                                message strcharinfo(0),"[Cash Shop] Transaction completed.";                                mes "thx!";                        }

  10. you can try this  not tested

     

    -    script    asdfjkl    -1,{end;OnClock0800:OnClock1900:	.@tt = 1;OnInit:        atcommand "@reloadbattleconf";	if(gettime(4)!=5 && gettime(4)!=6  && ( !gettime(4) && !@tt ? 0 : 1 ) )		end;	if((gettime(3) >= 1 && gettime(3) < 8 ) || (gettime(3) >= 14 && gettime(3) < 19) )		end;	announce "double drop rate started", bc_all;	setbattleflag ("base_exp_rate", getbattleflag("base_exp_rate")*2);	setbattleflag ("job_exp_rate", getbattleflag("job_exp_rate")*2);	setbattleflag ("item_rate_common", getbattleflag("item_rate_common")*2);	setbattleflag ("item_rate_heal", getbattleflag("item_rate_heal")*2);	setbattleflag ("item_rate_use", getbattleflag("item_rate_use")*2);	setbattleflag ("item_rate_equip", getbattleflag("item_rate_equip")*2);	end;OnClock0100:	.@mo = 1;OnClock1400:	if(gettime(4)!=5 && gettime(4)!=6 && ( !gettime(4) && !.@mo ? 0 : 1 ) )		end;	atcommand "@reloadbattleconf";	announce "double drop rate ended", bc_all;	end;}

  11. solved by myself

     

     

     

    {	Id: 14586	AegisName: "Spark_Candy"	Name: "jumping candy"	Type: 2	Buy: 0	Weight: 10	Upper: 63	Delay: 180000	Trade: {		nodrop: true		noselltonpc: true	}	Script: <" 		sc_start SC_INCBASEATK,60000,20;		sc_start SC_INCASPDRATE,60000,25;		sc_start SC_ENDURE,60000,1;		sc_start4 SC_HPDRAIN,60000,100,10,0,0;	">},
    adding required sc state

     

     

    4d6a9494405c271534390ae72db713bf0dcaaee db/const.txt     |  2 ++ src/map/status.c | 26 +++++++++++++++++++++++++- src/map/status.h |  6 +++--- 3 files changed, 30 insertions(+), 4 deletions(-)diff --git a/db/const.txt b/db/const.txtindex fc1aa0f..88586ef 100644--- a/db/const.txt+++ b/db/const.txt@@ -953,6 +953,7 @@ SC_CASH_RECEIVEITEM	259 SC_CASH_BOSS_ALARM	260 SC_CASH_DEATHPENALTY	261 SC_CRITICALPERCENT	262+SC_INCBASEATK	264 SC_PROTECT_MDEF	266 SC_HEALPLUS	268 SC_PNEUMA	269@@ -971,6 +972,7 @@ SC_MER_SP	282 SC_MER_HIT	283 SC_MER_QUICKEN	284 SC_REBIRTH	285+SC_HPDRAIN	288 SC_ITEMSCRIPT	290 SC_S_LIFEPOTION	291 SC_L_LIFEPOTION	292diff --git a/src/map/status.c b/src/map/status.cindex 30907b5..340c598 100644--- a/src/map/status.c+++ b/src/map/status.c@@ -936,6 +936,7 @@ void initChangeTables(void) { 	status->ChangeFlagTable[SC_INCFLEE] |= SCB_FLEE; 	status->ChangeFlagTable[SC_INCFLEERATE] |= SCB_FLEE; 	status->ChangeFlagTable[SC_CRITICALPERCENT] |= SCB_CRI;+	status->ChangeFlagTable[SC_INCBASEATK] |= SCB_BATK; 	status->ChangeFlagTable[SC_INCASPDRATE] |= SCB_ASPD; 	status->ChangeFlagTable[SC_PLUSAVOIDVALUE] |= SCB_FLEE2; 	status->ChangeFlagTable[SC_INCMHPRATE] |= SCB_MAXHP;@@ -4522,6 +4523,8 @@ unsigned short status_calc_batk(struct block_list *bl, struct status_change *sc, 	if(sc->data[SC_GS_GATLINGFEVER]) 		batk += sc->data[SC_GS_GATLINGFEVER]->val3; #endif+	if(sc->data[SC_INCBASEATK])+		batk += sc->data[SC_INCBASEATK]->val1; 	if(sc->data[SC_BATKFOOD]) 		batk += sc->data[SC_BATKFOOD]->val1; 	if(sc->data[SC_FIRE_INSIGNIA] && sc->data[SC_FIRE_INSIGNIA]->val1 == 2)@@ -7456,6 +7459,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t 				if (sce->val2 > val2) 					return 0; 				break;+			case SC_HPDRAIN: 			case SC_S_LIFEPOTION: 			case SC_L_LIFEPOTION: 			case SC_CASH_BOSS_ALARM:@@ -7836,6 +7840,16 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t 				if (!val4) val4 = 1; 				tick_time = 10000; // [GodLesZ] tick time 				break;+			case SC_HPDRAIN:+				if( val1 == 0 ) return 0;+				// val1 = heal percent/amout+				// val2 = seconds between heals+				// val4 = total of heals+				if( val2 < 1 ) val2 = 1;+				if( (val4 = tick/(val2 * 1000)) < 1 )+					val4 = 1;+				tick = val2 * 1000; // val2 = Seconds between heals+				break; 			case SC_S_LIFEPOTION: 			case SC_L_LIFEPOTION: 				if( val1 == 0 ) return 0;@@ -10632,7 +10646,17 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) { 				return 0; 			} 			break;-+		case SC_HPDRAIN:+			if( --(sce->val4) >= 0 ) {+				int flag, hp = (sce->val1 < 0) ? (int)(st->max_hp * -1 * sce->val1 / 100.) : sce->val1;+				map->freeblock_lock();+				status_fix_damage(NULL, bl, hp, 0);+				flag = !sc->data[type];+				map->freeblock_unlock();+				if( flag ) return 0;+				sc_timer_next((sce->val2 * 1000) + tick, status_change_timer, bl->id, data);+			}+		break; 		case SC_S_LIFEPOTION: 		case SC_L_LIFEPOTION: 			if( sd && --(sce->val4) >= 0 ) {diff --git a/src/map/status.h b/src/map/status.hindex 8028d8f..4ad2a95 100644--- a/src/map/status.h+++ b/src/map/status.h@@ -315,7 +315,7 @@ typedef enum sc_type { 	SC_HLIF_FLEET, 	SC_HLIF_SPEED, 	SC_HAMI_DEFENCE,-	SC_INCASPDRATE,+	SC_INCASPDRATE,	//248 	SC_PLUSAVOIDVALUE, 	SC_JAILED,	//250 	SC_ENCHANTARMS,@@ -331,7 +331,7 @@ typedef enum sc_type { 	SC_CASH_DEATHPENALTY, 	SC_CRITICALPERCENT, 	//SC_INCDEF,-	//SC_INCBASEATK = 264,+	SC_INCBASEATK = 264, 	//SC_FASTCAST, 	SC_PROTECT_MDEF = 266, 	//SC_HPREGEN,@@ -356,7 +356,7 @@ typedef enum sc_type { 	SC_REBIRTH, 	//SC_SKILLCASTRATE, //286 	//SC_DEFRATIOATK,-	//SC_HPDRAIN,+	SC_HPDRAIN = 288, 	//SC_SKILLATKBONUS, 	SC_ITEMSCRIPT = 290, 	SC_S_LIFEPOTION,

     

×
×
  • Create New...

Important Information

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