Jump to content
  • 0

ChatRoom Change Every 2 Second


RyokoMVP

Question


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  209
  • Reputation:   3
  • Joined:  11/28/11
  • Last Seen:  

hello , this is my script

prontera,214,187,5	script	Sample	992,{

OnPaket:
if(Zeny < 100000) goto NeedZenys;
set Zeny,zeny-100000;
percentheal 100,100;
sc_start SC_BLESSING,360000,10;
sc_start SC_INCREASEAGI,360000,10;
sc_start SC_MAGNIFICAT,360000,10;
sc_start SC_IMPOSITIO,360000,10;
skilleffect 361,0; sc_start SC_ASSUMPTIO,360000,10;
end;
OnBuffs:
if(Zeny < 500) goto NeedZenys;
set Zeny,zeny-500;
percentheal 100,100;
skilleffect 34,0; sc_start SC_BLESSING,360000,10;
skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;
end;
OnLink:
if(Zeny < 10000) goto NeedZenys;
set Zeny,zeny-10000;
switch ( basejob ) {
 case Job_Alchemist:	set .@spirit, 445; break;
 case Job_Monk:	 set .@spirit, 447; break;
 case Job_Star_Gladiator:  set .@spirit, 448; break;
 case Job_Sage:	 set .@spirit, 449; break;
 case Job_Crusader:	set .@spirit, 450; break;
 case Job_SuperNovice:   set .@spirit, 451; break;
 case Job_Knight:	set .@spirit, 452; break;
 case Job_Wizard:	set .@spirit, 453; break;
 case Job_Priest:	set .@spirit, 454; break;
 case Job_Bard: case Job_Dancer: set .@spirit, 455; break;
 case Job_Rogue:	 set .@spirit, 456; break;
 case Job_Assassin:	set .@spirit, 457; break;
 case Job_Blacksmith:   set .@spirit, 458; break;
 case Job_Hunter:	set .@spirit, 460; break;
 case Job_Soul_Linker:   set .@spirit, 461; break;
 default:
  if ( upper == 1 && baselevel < 70 )
set .@spirit, 494;
}
if ( .@spirit ) {
 sc_start4 sc_spirit, 360000, 5, .@spirit,0,0;
 skilleffect .@spirit, 5;
}
end;

NeedZenys:
mes "You Don't Have Money";
close;

OnInit:
defpattern 1, "paket","OnPaket";
defpattern 1, "buff","OnBuffs";
defpattern 1, "link","OnLink";
activatepset 1;
end;
}

how if i want to make this NPC have a waiting room ( pub ) and change every 2 second ?

i need example :

pub 1 : Paket Price Is 100000

Pub 2 : Buff Price Is 500

Pub 3 : Link Price Is 10000

Just Have 1 Pubs , But Change Every 2 second like BOT ~ thanks...

i already read Here

but i still confuse~ sorry >_<

Edited by RyokoMVP
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

use this....

OnInit:
setarray .pub_title$[0],"Paket","Buff","Link";
while( 1 ){
   delwaitingroom;
   waitingroom .pub_title$[ .i % 3 ],0;
.i++;
sleep 2000;
}
end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  209
  • Reputation:   3
  • Joined:  11/28/11
  • Last Seen:  

i try like this

prontera,214,187,5	script	Sample	992,{

OnS1:
if(Zeny < 500) goto NeedZenys;
set Zeny,zeny-500;
percentheal 100,100;
skilleffect 34,0; sc_start SC_BLESSING,180000,10;
skilleffect 29,0; sc_start SC_INCREASEAGI,180000,10;
sc_start SC_MAGNIFICAT,180000,10;
end;
OnS2:
if(Zeny < 50000) goto NeedZenys;
set Zeny,zeny-50000;
percentheal 100,100;
sc_start SC_BLESSING,360000,10;
sc_start SC_INCREASEAGI,360000,10;
sc_start SC_MAGNIFICAT,360000,10;
sc_start SC_IMPOSITIO,180000,10;
skilleffect 361,0; sc_start SC_ASSUMPTIO,180000,10;
end;
OnS3:
if(Zeny < 5000) goto NeedZenys;
set Zeny,zeny-5000;
switch ( basejob ) {
 case Job_Alchemist:	set .@spirit, 445; break;
 case Job_Monk:	 set .@spirit, 447; break;
 case Job_Star_Gladiator:  set .@spirit, 448; break;
 case Job_Sage:	 set .@spirit, 449; break;
 case Job_Crusader:	set .@spirit, 450; break;
 case Job_SuperNovice:   set .@spirit, 451; break;
 case Job_Knight:	set .@spirit, 452; break;
 case Job_Wizard:	set .@spirit, 453; break;
 case Job_Priest:	set .@spirit, 454; break;
 case Job_Bard: case Job_Dancer: set .@spirit, 455; break;
 case Job_Rogue:	 set .@spirit, 456; break;
 case Job_Assassin:	set .@spirit, 457; break;
 case Job_Blacksmith:   set .@spirit, 458; break;
 case Job_Hunter:	set .@spirit, 460; break;
 case Job_Soul_Linker:   set .@spirit, 461; break;
 default:
  if ( upper == 1 && baselevel < 70 )
set .@spirit, 494;
}
if ( .@spirit ) {
 sc_start4 sc_spirit, 360000, 5, .@spirit,0,0;
 skilleffect .@spirit, 5;
}
end;

NeedZenys:
mes "You Don't Have Money";
close;

OnInit:
defpattern 1, "S1","OnS1";
defpattern 1, "S2","OnS2";
defpattern 1, "S3","OnS3";
activatepset 1;

setarray .pub_title$[0],"S1 = 500","S2 = 50.000","S3 = 5000";
while( 1 ){
delwaitingroom;
waitingroom .pub_title$[ .i % 3 ],0;
.i++;
sleep 2000;
}
end;

}

but only show first pub , and never change ( first pub is S1 ) S2 And S3 Is Not Shown

btw i got error like this @map server

[Debug]: Source (NPC): Sample at prontera (214,187)

[Warning]: Found more arguments than necessary.

Edited by RyokoMVP
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  43
  • Reputation:   15
  • Joined:  06/24/12
  • Last Seen:  

You pasted an incomplete debug message. :P

Please, post some lines that are above those you posted, They're probably saying which script command has received too many arguments.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  209
  • Reputation:   3
  • Joined:  11/28/11
  • Last Seen:  

i think debug message is only that , and repeat...maybe you can try it so you will know the debug message

i already post the script

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

the script you posted.... work fine in my test server...

and..if you are not using eAthena..make sure you change

.i++;

into

set .i,.i + 1;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  209
  • Reputation:   3
  • Joined:  11/28/11
  • Last Seen:  

the script you posted.... work fine in my test server...

and..if you are not using eAthena..make sure you change

.i++;

into

set .i,.i + 1;

okey i'll try... i use valhalla ( judas svn ) not eAthena >_<

okay , problem solved Emistry , thanks a lot

Edited by RyokoMVP
Link to comment
Share on other sites

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.

×
×
  • Create New...