Jump to content
  • 0

help to correct this script (exchange item with input)


Question

Posted (edited)

guys i've been made some script..but someone can abuse this script..it's really?can abuse?

 

ordeal_2-1,147,273,5    script    Zeny exchanger    105,{
set .@name$,"[ZenyExchanger]";
    
    mes    .@name$;
    mes    "can i help u?";
    menu    "i want to be rich",go,"Nothing",ex;
ex:
    next;
    mes    .@name$;
    mes    "Okay Bye!";
    close;
go:
    next;
    mes    .@name$;
    mes    "ok i have some quest for you bring this item.";
    menu    "10 Jellopy = 300.000zeny ",jp,"30 Orcish Voucher = 3 jt zeny",ov;
jp:
    next;
    if(countitem(909)<10) goto NoItems;
    mes    .@name$;
    mes    "input your jellopy want exchange to zeny";
    input .@t;
    logmes .@t +" SC with "+ Zeny +" Zeny";
    set Zeny,Zeny+300000*.@t/10;
    delitem 909,.@t;
    close;
    
    
ov:
    next;
    if(countitem(931)<30) goto NoItems;
    mes    .@name$;
    mes    "input orcish want exchange to zeny";
    input .@t;
    logmes .@t +" SC with "+ Zeny +" Zeny";
    set Zeny,Zeny+1000000*.@t/10;
    delitem 931,.@t;
    close;
NoItems:
    mes "[Zeny exchanger]";
    mes "where's your item?";
    mes "please come back if u bring this item";
    close;

}

 

if im input random 1000 jellopy but in this inventory just have 100 jellopy player can gain zeny...o_oa..my script is correct?

Edited by Capuche
into Code

1 answer to this question

Recommended Posts

Posted

Add a check because on your script player can input as many as they want regardless on the jellopy that a certain player has.

if (.@t < countitem(909)) {
    mes .@name$;
    mes "Invalid input";
    close;
}

Or : 

input(.@t, 0, countitem(909))

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...