Jump to content
  • 0

Converting


Mootie

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  815
  • Reputation:   86
  • Joined:  10/26/12
  • Last Seen:  

Hi guys i was wondering if i did try for this script instead an item i change it to points so every specialy killed they will get poring points

-	script	Poring Summoner	-1,{
OnInit:

 //---- NPC Config -----
 set .@PoringPoints, 1;
 set .SpecialPorings, 250;
 set .NormalPorings, 250;
 setarray .Map$[0], "lighthalzen","louyang","comodo","xmas","aldebaran","izlude","payon","geffen","morocc","prontera";
 //---------------------
 end;

OnMinute00: //means the event starts every hour

  killmonsterall .Map$[.loc]; //Kills monsters in case the even doesn't end in time for the next one.

  set .loc, rand(getarraysize(.Map$)); //Getting a random location (index of map array listed above)

  setmapflag .Map$[.loc], mf_noskill;

  monster .Map$[.loc], 0, 0, "Poring", 1002, .SpecialPorings, "Poring Summoner::OnSpecialKill";
  monster .Map$[.loc], 0, 0, "Poring", 1002, .NormalPorings, "Poring Summoner::OnNormalKill";

  announce "The Poring Event has begun!", 0;
  sleep 1000;
  announce "Location: " + .Map$[.loc], 0;
  sleep 1000;
  announce "Special Poring: " + .SpecialPorings, 0;
  sleep 1000;
  announce "Normal Poring: " + .NormalPorings, 0;
  end;

OnSpecialKill:
  set .SpecialPorings, .SpecialPorings - 1;
  mapannounce .Map$[.loc], strcharinfo(0) + " got a " + @PoringPoints(.PoringPoints+1) + "!", bc_blue;
  set.@PoringPoints,@PoringPoints+1;
  goto PoringCount;

OnNormalKill:
  set .NormalPorings, .NormalPorings - 1;
  goto PoringCount;

PoringCount:

  if( .SpecialPorings || .NormalPorings )
  mapannounce .Map$[.loc], "Special Poring: " + .SpecialPorings + " || Normal Poring: " + .NormalPorings, bc_blue;

  else {
  announce "The Poring Event has ended.", 0;
  removemapflag .Map$[.loc], mf_noskill;

  deletearray .Map$[0], getarraysize(.Map$); //Reset the map array before creating it back, just to avoid bugs.
  goto OnInit;
  }
 end;

}

correct? to give players who killed a special poring will get poring points?

Edited by Mootie
Link to comment
Share on other sites

12 answers to this question

Recommended Posts


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

you have to change the variable type..

.@PoringPoints

the point will dissappear after the script has end...

you should use a permanent variable..like..

PoringPoints
#PoringPoints
##PoringPoints

refer this

Variables

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  815
  • Reputation:   86
  • Joined:  10/26/12
  • Last Seen:  

-    script    Poring Summoner    -1,{
OnInit:

 //---- NPC Config -----
 set .##PoringPoints, 1;
 set .SpecialPorings, 250;
 set .NormalPorings, 250;
 setarray .Map$[0], "lighthalzen","louyang","comodo","xmas","aldebaran","izlude","payon","geffen","morocc","prontera";
 //---------------------
 end;

OnMinute00: //means the event starts every hour

  killmonsterall .Map$[.loc]; //Kills monsters in case the even doesn't end in time for the next one.

  set .loc, rand(getarraysize(.Map$)); //Getting a random location (index of map array listed above)

  setmapflag .Map$[.loc], mf_noskill;

  monster .Map$[.loc], 0, 0, "Poring", 1002, .SpecialPorings, "Poring Summoner::OnSpecialKill";
  monster .Map$[.loc], 0, 0, "Poring", 1002, .NormalPorings, "Poring Summoner::OnNormalKill";

  announce "The Poring Event has begun!", 0;
  sleep 1000;
  announce "Location: " + .Map$[.loc], 0;
  sleep 1000;
  announce "Special Poring: " + .SpecialPorings, 0;
  sleep 1000;
  announce "Normal Poring: " + .NormalPorings, 0;
  end;

OnSpecialKill:
  set .SpecialPorings, .SpecialPorings - 1;
  mapannounce .Map$[.loc], strcharinfo(0) + " got a " + @PoringPoints(.PoringPoints+1) + "!", bc_blue;
  set.##PoringPoints,##PoringPoints+1;
  goto PoringCount;

OnNormalKill:
  set .NormalPorings, .NormalPorings - 1;
  goto PoringCount;

PoringCount:

  if( .SpecialPorings || .NormalPorings )
     mapannounce .Map$[.loc], "Special Poring: " + .SpecialPorings + " || Normal Poring: " + .NormalPorings, bc_blue;

  else {
     announce "The Poring Event has ended.", 0;
     removemapflag .Map$[.loc], mf_noskill;

     deletearray .Map$[0], getarraysize(.Map$); //Reset the map array before creating it back, just to avoid bugs.
     goto OnInit;
  }
 end;

}

become like this?

you have to change the variable type..

.@PoringPoints

the point will dissappear after the script has end...

you should use a permanent variable..like..

PoringPoints
#PoringPoints
##PoringPoints

refer this

Variables

im having error while editing them o.o would you tell me where should apply

PoringPoints

#PoringPoints

##PoringPoints

Link to comment
Share on other sites


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

alway double check what you have edit...

set.##PoringPoints,##PoringPoints+1;  <------------------------ ERROR

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  815
  • Reputation:   86
  • Joined:  10/26/12
  • Last Seen:  

alway double check what you have edit...

set.##PoringPoints,##PoringPoints+1;  <------------------------ ERROR

i already see what i edit bit still o getting errprs

post-9398-0-54683000-1352792611_thumb.png

Link to comment
Share on other sites


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

i show you these variables....

PoringPoints
#PoringPoints
##PoringPoints

but i never show you this...

.##PoringPoints

and this variable type doesnt event exist in RO Emulator... LOL...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  815
  • Reputation:   86
  • Joined:  10/26/12
  • Last Seen:  

i show you these variables....

PoringPoints
#PoringPoints
##PoringPoints

but i never show you this...

.##PoringPoints

and this variable type doesnt event exist in RO Emulator... LOL...

oh i thought i should add them in the script o.o so whats should i do? or can you help me for this script

bump

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.01
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

just remove the dot in front of your .##PoringPoints it should be set ##PoringPoints,##PoringPoints+1;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  815
  • Reputation:   86
  • Joined:  10/26/12
  • Last Seen:  

for real im still wondering how to convert those

i still cant get it with this o.o lol

//===== rAthena Script =======================================
//= Poring Summoner
//===== By: ==================================================
//= Bahmut (Made it automated)
//= MoonlightRO (Original)
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
//= TXT & SQL
//===== Link to orginal: =====================================
//= [url="http://www.eathena.ws/board/index.php?showtopic=236779"]http://www.eathena.w...howtopic=236779[/url]
//============================================================

-	script	Poring Summoner	-1,{

OnInit:
	//---- NPC Config -----
	set #Poring_Points+1,
	set .SpecialPorings,2;
	set .NormalPorings,2;
	//---------------------
	initnpctimer;
	end;

OnSpecialKill:
	set .SpecialPorings[1],.SpecialPorings[1]-1;
	announce strcharinfo(0) + " got a " + getitemname(.ItemID) + "!",bc_map;
	getitem .ItemID,1;
	goto PoringCount;

OnNormalKill:
	set .NormalPorings[1],.NormalPorings[1]-1;
	goto PoringCount;

PoringCount:
	announce "Special Poring: " + .SpecialPorings[1] + " || Normal Poring: " + .NormalPorings[1],bc_map;
	if(!.SpecialPorings[1]) goto EndEvent;
	end;

OnTimer216000000:
RestartEvent:
	killmonster .Map$,"All";
	set .Event,0;
	set .SpecialPorings[1],0;
	set .NormalPorings[1],0;

	removemapflag .Map$,mf_noskill;
	set $@ran, rand(1,10);
	if ($@ran == 10) set .Map$,"lighthalzen";
	if ($@ran == 9) set .Map$,"louyang";
	if ($@ran == 8) set .Map$,"comodo";
	if ($@ran == 7) set .Map$,"xmas";
	if ($@ran == 6) set .Map$,"aldebaran";
	if ($@ran == 5) set .Map$,"izlude";
	if ($@ran == 4) set .Map$,"payon";
	if ($@ran == 3) set .Map$,"geffen";
	if ($@ran == 2) set .Map$,"morocc";
	if ($@ran == 1) set .Map$,"prontera";
	setmapflag .Map$,mf_noskill;
	monster .Map$,0,0,"Poring",1002,.SpecialPorings,"Poring Summoner::OnSpecialKill";
	monster .Map$,0,0,"Poring",1002,.NormalPorings,"Poring Summoner::OnNormalKill";
	set .SpecialPorings[1],.SpecialPorings;
	set .NormalPorings[1],.NormalPorings;
	announce "The Poring Event has begun!",bc_all;
	announce "Location: " + .Map$,bc_all;
	announce "Special Poring: " + .SpecialPorings,bc_all;
	announce "Normal Poring: " + .NormalPorings,bc_all;

	setnpctimer 0;
	end;
}

Edited by Mootie
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

//===== rAthena Script =======================================
//= Poring Summoner
//===== By: ==================================================
//= Bahmut (Made it automated)
//= MoonlightRO (Original)
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
//= TXT & SQL
//===== Link to orginal: =====================================
//= [url="http://www.eathena.ws/board/index.php?showtopic=236779"]http://www.eathena.w...howtopic=236779[/url]
//============================================================
- script Poring Summoner -1,{
OnInit:
 //---- NPC Config -----
 set .SpecialPorings,2;
 set .NormalPorings,2;
 //---------------------
 initnpctimer;
 end;

OnSpecialKill:
 set .SpecialPorings[1],.SpecialPorings[1]-1;
 announce strcharinfo(0) + " got a " + getitemname(.ItemID) + "!",bc_map;
//  getitem .ItemID,1;
 set PoringPoint,PoringPoint+1;
 dispbottom "You got 1 Poring Point";
 dispbottom "Total Poring Points:"+PoringPoint;
 goto PoringCount;

OnNormalKill:
 set .NormalPorings[1],.NormalPorings[1]-1;
 goto PoringCount;

PoringCount:
 announce "Special Poring: " + .SpecialPorings[1] + " || Normal Poring: " + .NormalPorings[1],bc_map;
 if(!.SpecialPorings[1]) goto EndEvent;
 end;

OnTimer216000000:
RestartEvent:
 killmonster .Map$,"All";
 set .Event,0;
 set .SpecialPorings[1],0;
 set .NormalPorings[1],0;

 removemapflag .Map$,mf_noskill;
 set $@ran, rand(1,10);
 if ($@ran == 10) set .Map$,"lighthalzen";
 if ($@ran == 9) set .Map$,"louyang";
 if ($@ran == 8) set .Map$,"comodo";
 if ($@ran == 7) set .Map$,"xmas";
 if ($@ran == 6) set .Map$,"aldebaran";
 if ($@ran == 5) set .Map$,"izlude";
 if ($@ran == 4) set .Map$,"payon";
 if ($@ran == 3) set .Map$,"geffen";
 if ($@ran == 2) set .Map$,"morocc";
 if ($@ran == 1) set .Map$,"prontera";
 setmapflag .Map$,mf_noskill;
 monster .Map$,0,0,"Poring",1002,.SpecialPorings,"Poring Summoner::OnSpecialKill";
 monster .Map$,0,0,"Poring",1002,.NormalPorings,"Poring Summoner::OnNormalKill";
 set .SpecialPorings[1],.SpecialPorings;
 set .NormalPorings[1],.NormalPorings;
 announce "The Poring Event has begun!",bc_all;
 announce "Location: " + .Map$,bc_all;
 announce "Special Poring: " + .SpecialPorings,bc_all;
 announce "Normal Poring: " + .NormalPorings,bc_all;

 setnpctimer 0;
 end;
}

This will give Poring Points upon killing Special Poring, variable is "PoringPoint"

Please See Post #12

Edited by ToastOfDoom
codeboxed
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  815
  • Reputation:   86
  • Joined:  10/26/12
  • Last Seen:  

its look like there is alot of missing tab

//===== rAthena Script =======================================
//= Poring Summoner
//===== By: ==================================================
//= Bahmut (Made it automated)
//= MoonlightRO (Original)
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
//= TXT & SQL
//===== Link to orginal: =====================================
//= [url="http://www.eathena.ws/board/index.php?showtopic=236779"]http://www.eathena.w...howtopic=236779[/url]
//============================================================
- script Poring Summoner -1,{
OnInit:
 //---- NPC Config -----
 set #Poring_Points+1,
 set .SpecialPorings,2;
 set .NormalPorings,2;
 //---------------------
 initnpctimer;
 end;

OnSpecialKill:
 set .SpecialPorings[1],.SpecialPorings[1]-1;
 announce strcharinfo(0) + " got a " + getitemname(.ItemID) + "!",bc_map;
//  getitem .ItemID,1;
 set PoringPoint,PoringPoint+1;
 dispbottom "You got 1 Poring Point";
 dispbottom "Total Poring Points:"+PoringPoint;
 goto PoringCount;

OnNormalKill:
 set .NormalPorings[1],.NormalPorings[1]-1;
 goto PoringCount;

PoringCount:
 announce "Special Poring: " + .SpecialPorings[1] + " || Normal Poring: " + .NormalPorings[1],bc_map;
 if(!.SpecialPorings[1]) goto EndEvent;
 end;

OnTimer216000000:
RestartEvent:
 killmonster .Map$,"All";
 set .Event,0;
 set .SpecialPorings[1],0;
 set .NormalPorings[1],0;

 removemapflag .Map$,mf_noskill;
 set $@ran, rand(1,10);
 if ($@ran == 10) set .Map$,"lighthalzen";
 if ($@ran == 9) set .Map$,"louyang";
 if ($@ran == 8) set .Map$,"comodo";
 if ($@ran == 7) set .Map$,"xmas";
 if ($@ran == 6) set .Map$,"aldebaran";
 if ($@ran == 5) set .Map$,"izlude";
 if ($@ran == 4) set .Map$,"payon";
 if ($@ran == 3) set .Map$,"geffen";
 if ($@ran == 2) set .Map$,"morocc";
 if ($@ran == 1) set .Map$,"prontera";
 setmapflag .Map$,mf_noskill;
 monster .Map$,0,0,"Poring",1002,.SpecialPorings,"Poring Summoner::OnSpecialKill";
 monster .Map$,0,0,"Poring",1002,.NormalPorings,"Poring Summoner::OnNormalKill";
 set .SpecialPorings[1],.SpecialPorings;
 set .NormalPorings[1],.NormalPorings;
 announce "The Poring Event has begun!",bc_all;
 announce "Location: " + .Map$,bc_all;
 announce "Special Poring: " + .SpecialPorings,bc_all;
 announce "Normal Poring: " + .NormalPorings,bc_all;

 setnpctimer 0;
 end;
}

This will give Poring Points upon killing Special Poring, variable is "PoringPoint"

another error show up after i put correct tabs

post-9398-0-34411000-1353732678_thumb.png

Edited by ToastOfDoom
codeboxed
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

Its because of that "code" function.

Anyways' here's the file.

I didn't saw you have put that on Oninit:

anyways, here's a working version.

porint.txt

Edited by Dastgir Pojee
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  815
  • Reputation:   86
  • Joined:  10/26/12
  • Last Seen:  

oh there ya go i was thinking that function already just got me awesome o.o

look at this exhanger

prontera,155,181,5	script	Sample#exchange	757,{
mes "Hi , "+strcharinfo(0)+" i can exchange your ^FF0000Poring Points^000000 for items.";
next;
mes "You have "+@Poring_Points+" Points. You've killed a total of "+( @Poring_Points / .Points )+" Poring.";
mes "What would you like to exchange for ?";
next;
for( set .@i,0; .@i < getarraysize( .ItemID ); set .@i,.@i + 1 )
set .@Menu$,.@Menu$ + "[ "+.Cost[.@i]+" P ] "+.Amount[.@i]+" x "+getitemname( .ItemID[.@i] )+":";
set .@i,( select( .@Menu$ ) - 1 );
mes "You have selected ^FF0000"+getitemname( .ItemID[.@i] )+"^000000";
mes "[ Cost : "+.Cost[.@i]+" Points ] ";
mes .Amount[.@i]+" x "+getitemname( .ItemID[.@i] );
if( @Poring_Points >= .Cost[.@i] ){
if( select("Exchange:Cancel") == 1 ){
	getitem .ItemID[.@i],.Amount[.@i];
	set @Poring_Points,@Poring_Points - .Cost[.@i];
}
}else{
mes "But, you dont have enough Points...";
}
close;

OnInit:
// Mob ID + Points Reward
//set .MobID,1002;
//set .Points,2;
// Item Exchange + Amount
setarray .ItemID[0],607,608,512;
setarray .Amount[0],1,2,3;
setarray .Cost[0],2,4,6;
end;

//OnNPCKillEvent:
//if( killedrid == .MobID ){
//	set @Poring_Points,@Poring_Points + .Points;
//	dispbottom "[ Point Reward ] Gained "+.Points+" Points. Total : "+@Poring_Points+" Points.";
}
end;
}

correct? but i will remove onnpckillevent

Edited by Mootie
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...