Jump to content
  • 0

Anyone can help me here?


Question

Posted

How to set this per character not per account?

prontera,155,181,5 script Sample 718,{

if( !#Freebies ){

set #Freebies,1;

mes "Welcome...this is your gift...";

getitem 607,10;

getitem 7539,10;

}else{

mes "You have claim the Reward already.";

}

close;

}

thanks in advance.

9 answers to this question

Recommended Posts

Posted

Removing "#" from "Freebies" will define the account permanent variable as character permanent variable.

so for every "#Freebies" in code change them for

Freebies

Posted (edited)

if( !PC_DIE_COUNTER ){
set PC_DIE_COUNTER,1;
mes "Welcome...this is your gift...";
getitem 607,10;
getitem 7539,10;
}else{
mes "You have claim the Reward already.";
}
close;
}

WOW .... WAIT !

PC_DIE_COUNTER is use for super novice get extra stats

sd->die_counter = pc_readglobalreg(sd,"PC_DIE_COUNTER");
// If a Super Novice has never died and is at least joblv 70, he gets all stats +10

if((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->die_counter == 0 && sd->status.job_level >= 70){

status->str += 10;

status->agi += 10;

status->vit += 10;

status->int_+= 10;

status->dex += 10;

status->luk += 10;

}

if change that, super novice will never get this bonus

Edited by AnnieRuru
Posted

if( !PC_DIE_COUNTER ){
set PC_DIE_COUNTER,1;
mes "Welcome...this is your gift...";
getitem 607,10;
getitem 7539,10;
}else{
mes "You have claim the Reward already.";
}
close;
}

WOW .... WAIT !

PC_DIE_COUNTER is use for super novice get extra stats

sd->die_counter = pc_readglobalreg(sd,"PC_DIE_COUNTER");
// If a Super Novice has never died and is at least joblv 70, he gets all stats +10

if((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->die_counter == 0 && sd->status.job_level >= 70){

status->str += 10;

status->agi += 10;

status->vit += 10;

status->int_+= 10;

status->dex += 10;

status->luk += 10;

}

if change that, super novice will never get this bonus

WOW .... WAIT !

PC_DIE_COUNTER is use for super novice get extra stats

just try to not waste permanent character variable :lol:

if(!BaseExp && !PC_DIE_COUNTER){
   getitem ...

  set  BaseExp,1;
}

Posted (edited)
   case SL_SUPERNOVICE:
   case SL_WIZARD:
       //NOTE: here, 'type' has the value of the associated MAPID, not of the SC_SPIRIT constant.
       if (sd && !(dstsd && (dstsd->class_&MAPID_UPPERMASK) == type)) {
           clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0);
           break;
       }
       if (skillid == SL_SUPERNOVICE && dstsd && dstsd->die_counter && !(rnd()%100))
       {    //Erase death count 1% of the casts
           dstsd->die_counter = 0;
           pc_setglobalreg(dstsd,"PC_DIE_COUNTER", 0);
           clif_specialeffect(bl, 0x152, AREA);
           //SC_SPIRIT invokes status_calc_pc for us.
       }

I don't think exp has anything to do with die counter but

having super novice soul link will reset the die counter

HELLL yeah its time for super novice to spam the healer npc gets super novice soul link to remove death counter

Edited by AnnieRuru
Posted (edited)

since rAthena removed txt save engine , we can use sql query to check without additional permanent character variable

-	script	abcde	-1,{
OnPCLoginEvent:
if(BaseLevel==1 && !BaseExp ){
	if(!query_sql("SELECT char_id FROM `global_reg_value` WHERE str='PC_DIE_COUNTER' AND char_id = "+getcharid(0),.@cid)){
		dispbottom "1st login";
		query_sql("INSERT INTO `global_reg_value`(char_id,str,value,type,account_id) VALUES ("+getcharid(0)+",'PC_DIE_COUNTER',0,3,0)");
	}
}

end;
}

Edited by QQfoolsorellina

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...