Jheiar Posted October 22, 2012 Posted October 22, 2012 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. Quote
QQfoolsorellina Posted October 22, 2012 Posted October 22, 2012 (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; } Edited October 22, 2012 by QQfoolsorellina Quote
JoWei Posted October 22, 2012 Posted October 22, 2012 Removing "#" from "Freebies" will define the account permanent variable as character permanent variable. so for every "#Freebies" in code change them for Freebies Quote
AnnieRuru Posted October 22, 2012 Posted October 22, 2012 (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 October 22, 2012 by AnnieRuru Quote
QQfoolsorellina Posted October 22, 2012 Posted October 22, 2012 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 if(!BaseExp && !PC_DIE_COUNTER){ getitem ... set BaseExp,1; } Quote
Bin4ry Posted October 22, 2012 Posted October 22, 2012 Not sure if novice die will their EXP return to 0? Quote
AnnieRuru Posted October 22, 2012 Posted October 22, 2012 (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 October 22, 2012 by AnnieRuru Quote
QQfoolsorellina Posted October 23, 2012 Posted October 23, 2012 (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 October 23, 2012 by QQfoolsorellina Quote
Question
Jheiar
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.