Jump to content
  • 0

Im having trouble with my script.


Lil Troll

Question


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Guys here is my situation, im trying to put callfunc on an item, the item does craft a stone but in a random chance, i cant get right the the script, when i load the script no error are found.

function script Crafting Tool {
dispbottom "" + strcharinfo(0) + " : Seems that the Crafting Tool is working...."
set .@menu, select ("Crafting Tool:Close");
if (.@menu == 1);
set .@r, rand(10);
if( .@r < 10 )
specialeffect2 306;
specialeffect2 183;
delitem 7849,10;
delitem 7758,10;
if( .@r == 3 )
getitem 27301,1;
delitem 7849,10;
delitem 7758,10;
specialeffect2 305;
specialeffect2 113;

close;

if (.@menu == 2);
close;
}

now here is my item:

 

27315,Crafting_Tool,Crafting Tool,0,50,,70,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{ callfunc "Crafting_Tool"; }

Edited by coldfire2k
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

You call function Crafting_Tool ( callfunc "Crafting_Tool"; ) but you have function name Crafting Tool which is not the same ( function script Crafting Tool  )

 

 

 

function script Crafting_Tool {
dispbottom "" + strcharinfo(0) + " : Seems that the Crafting Tool is working...."
set .@menu, select ("Crafting Tool:Close");
if (.@menu == 1);
set .@r, rand(10);
if( .@r < 10 )
specialeffect2 306;
specialeffect2 183;
delitem 7849,10;
delitem 7758,10;
if( .@r == 3 )
getitem 27301,1;
delitem 7849,10;
delitem 7758,10;
specialeffect2 305;
specialeffect2 113;

close;

if (.@menu == 2);
close;
}
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...