Jump to content

Treasure box script request


Recommended Posts


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  390
  • Reputation:   27
  • Joined:  07/12/12
  • Last Seen:  

(Tagalog)

scripto ng isang majikal na karton kung saan pwedeng kumuha ng walang kasiguraduhang uri ng gamit, isang beses sa isang araw at matatagpuan ito sa lokasyon na ito >> prontera 46,284

(English)

script of a magical box wherein you can get random chance of items, once a day and could be found at this location >> prontera 46,284

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Configure the random item array yourself.

- script MagicBoxSpawn -1,{
OnInit:
OnClock0000:
set .BoxReward[0],502,503,504,505,506;
set .SpawnHour, rand(24);

OnMinute00:
if (gettime(3) == .SpawnHour ) {
set .DelayMin, rand(60);
sleep (.DelayMin * 60000);
while(1) {
monster "prontera",46,284,"Magical Box",1360,1,"MagicBoxSpawn::OnBoxBreak";
// debugmes "Magical Box has been spawn!";
break;
}
}
end;

OnBoxBreak:
// Item Reward goes here

setarray .@Item[0],512,513,514;
setarray .@Amount[0],2,4,6;
set .@i, rand(getarraysize(.@Item));
getitem .@Item[.@i], .@Amount[.@i];
end;
}

Edited by darristan
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  390
  • Reputation:   27
  • Joined:  07/12/12
  • Last Seen:  

it say there is an error in line 1..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Change the space into tab.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  390
  • Reputation:   27
  • Joined:  07/12/12
  • Last Seen:  

still sends out error:

[Error]: npc_parsesrcfile: Unknown syntax in file 'npc/custom/MagicBox.txt', line '1'. Stopping... 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

- script<tab> MagicBoxSpawn <tab>-1,{

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  390
  • Reputation:   27
  • Joined:  07/12/12
  • Last Seen:  

it still sends out the same error..

and now theres another one, it say "unknown syntak found on line 2 stopping...."

here is what my script actually looks like:

- script MagicBoxSpawn -1,{

OnInit:

OnClock0000:

set .BoxReward[0],502,503,504,505,506;

set .SpawnHour, rand(24);

OnMinute00:

if (gettime(3) == .SpawnHour ) {

set .DelayMin, rand(60);

sleep (.DelayMin * 60000);

while(1) {

monster "prontera",46,284,"Magical Box",1360,1,"MagicBoxSpawn::OnBoxBreak";

// debugmes "Magical Box has been spawn!";

break;

}

}

end;

OnBoxBreak:

// Item Reward goes here

setarray .@Item[0],512,513,514;

setarray .@Amount[0],2,4,6;

set .@i, rand(getarraysize(.@Item));

getitem .@Item[.@i], .@Amount[.@i];

end;

}

Do i need to put another tab on both sides?

Edited by stydianx
Link to comment
Share on other sites


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

<TAB>

this refer to the TAB Button ...not asking you to put "<TAB>" on the script header..... /swt

picture11fg4.png

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  390
  • Reputation:   27
  • Joined:  07/12/12
  • Last Seen:  

yes i know.. i just did that as an indicator! LOOOOOL! /whisp

and by the way, nice nails :) those looks like a girl nail :) are you sure your a male? XD

there i edited my previous post.. now that how it really looks like :) sorry for the confusion..

Edited by stydianx
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
Reply to this topic...

×   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...