Jump to content
  • 0

Help with an old script


chaossong

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  07/29/12
  • Last Seen:  

Ello to all

I have recently come back to RO and its been a long long time...i have found this script http://www.eathena.w...pic=218810&st=0(old eathena forum) and i ran it on 3cream amod i have this error ....

parse_script: unresolved function references

132 : getitem @scratch_price[.@c],@scratch_amount[.@c]

;

133 : }

134 : }

135 : }

136 :

* 137 : '}'

i wonder if anyone know how to fix it...i used to know how but forgot.

Edited by chaossong
Link to comment
Share on other sites

5 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:  

alway show ur edited script...linking the original script is useless when you edited something in the script.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  07/29/12
  • Last Seen:  

@ Emistry well i didnt edit anything i just copy and paste it...the only thing i edit is the location

Heres the script(from my server)

prontera.gat,180,150,4 script Lottery Scratch Tickets 85,{
setarray @scratch_price,  717,//Phreeoni price: currently blue gemstones
1000,//Dark Snake Lord price: currently star crumps
985,//Baphomet price: currently Elunium
969,//Golden Thiefbug price: currently Gold
989,//Dark Lord price: currently Emperium Anvil
rand(7073,7092); // Thanatos price: currenly a random item for godlike equipment
setarray @scratch_amount, 10,
 5,
 3,
 2,
 1,
 1;
setarray @scratch_sign$,  "Phr",
"DSL",
"Bap",
"GTB",
"DaL",
"Tha";
setarray @scratch_chance, 2650, // Phr: 26,5%
2250, // DSL: 22,5%
1850, // Bap: 18,5%
1450, // GTB: 14,5%
1050, // DaL: 10,5%
 750; // Tha:  7,5%

for(set .@a, 0; .@a<getarraysize(@scratch_chance);set .@a, .@a+1)
{
for( set .@b, .@a+1; .@b<getarraysize(@scratch_chance); set .@b, .@b+1)
{
set @scratch_chance[.@a], @scratch_chance[.@a]+@scratch_chance[.@b];
}
}

cleararray @slot$, "", 9;
set .@payment, 1000;

function Slotbelegung;
function checkRow;
function restore;

set @menu, 0;

while(@menu!=1)
{
mes "[Lottery Scratch Tickets]";
mes "Hi do want to buy Lottery Scratch Tickets?";
mes "Only "+.@payment+" zeny";
mes "The best price is an item for mixing godlike equip";

if(select("Give me one ^^:What does i need to win:No I hold my money") > 1)
{
if(@menu&1)
{
mes "Ok have a lucky day";
close;
}
else
{
mes "You need 3 same Objekts in a slot";
mes "[Phr] ";
mes "[DSL] ";
mes "[bap] ";
mes "[GTB] ";
mes "[DaL] ";
mes "[Tha] ";
next;
}
}
}
setarray .@row1, 0, 1, 2;
setarray .@row2, 0, 3, 6;
setarray .@row3, 0, 4, 8;
setarray .@row4, 1, 4, 7;
setarray .@row5, 6, 4, 2;
setarray .@row6, 2, 5, 8;
setarray .@row7, 3, 4, 5;
setarray .@row8, 6, 7, 8;

set .@slots, 8;

set zeny, zeny -.@payment;
mes "Here my friend ^^";
for(set .@a, 0;; set .@a, .@a+1)
{
mes "["+@slot$[0]+"] ["+@slot$[1]+"] ["+@slot$[2]+"]";
mes "["+@slot$[3]+"] ["+@slot$[4]+"] ["+@slot$[5]+"]";
mes "["+@slot$[6]+"] ["+@slot$[7]+"] ["+@slot$[8]+"]";
next;
if(.@a > 8) break;
Slotbelegung(.@a);
}

for(set .@a, 0; .@a<.@slots;set .@a,.@a+1)
{
set .@win, .@win+checkRow(getd(".@row"+(.@a+1)+"[0]"),getd(".@row"+(.@a+1)+"[1]"),getd(".@row"+(.@a+1)+"[2]"));
}
if (.@win)
{
next;
mes "You got your prizes now go.";
close;
}
mes "Sorry, but you didn't win anything.";
close;

function Slotbelegung {
set .@rand, rand(1,10000);
for(set .@b, 0; .@b<getarraysize(@scratch_sign$)-1;set .@b, .@b+1)
{
if(@scratch_chance[(getarraysize(@scratch_sign$)-1-.@] >= .@rand) break;
}
set @slot$[getarg(0)], @scratch_sign$[(getarraysize(@scratch_sign$)-1-.@];
}

function checkRow {
function Win;
if(@slot$[getarg(0)] == @slot$[getarg(1)] && @slot$[getarg(0)] == @slot$[getarg(2)])
{
Win(@slot$[getarg(0)]);
return 1;
}
return 0;
}

function Win {
for(set .@c,0; .@c<getarraysize(@scratch_sign$); set .@c,.@c+1)
{
if(getarg(0) == @scratch_sign$[.@c] )
{
mes "You got 3 "+@scratch_sign$[.@c]+"!";
getitem @scratch_price[.@c],@scratch_amount[.@c];

}
}
}

}

As you can see here the 4 } are not position like the one in the original script...idk why but it came like that when i copy paste it..

Edited by Joseph
Codebox.
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:  

hmm... ? did it show you problem ? 4 continous curley at the end of script doesnt mean the script got problem sometimes...

and did you run it and test it ?

the curley doesnt look got any problem at all...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  07/29/12
  • Last Seen:  

i ran and test it doesnt work.... the npc shows but cant click on it ...thats why im here and im looking for help since the beginning

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

What errors did you get on your console control panel when you click on it? Please paste them also.

Peopleperson49

  • Upvote 1
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...