Radian

Members
  • Content Count

    1,388
  • Avg. Content Per Day

    1
  • Joined

  • Last visited

  • Days Won

    13

Radian last won the day on February 17 2017

Radian had the most liked content!

Community Reputation

140 Excellent

About Radian

  • Rank
    Wicked
  • Birthday 07/11/1993

Profile Information

  • Gender
    Male
  • Location
    Toronto
  • Github
    RadianFord
  • Interests
    Playing Ragnarok

Contact Methods

  • Discord
    Radian#0049

Recent Profile Visitors

5,389 profile views
  1. Hey guys, can someone help me with this script? I dont wanna messed it up. //===== rAthena Script ======================================= //= Player Questing Board //===== By: ================================================== //= Yuchinin //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= A questing board which anyone can post request on it and //= other that meet the requirement can turn-in the request and //= claim the reward. //=====******** Note ********================================= //= This script need my release of: //= 1. Common Useful Function (common.txt) //= Better let it load first before adding my other script. //===== Additional Comments: ================================= //= 0.9d - Temporary fix the OnSellItem not store the details //= of non equipment other than id and amount //= 0.9e - Fixed completed request cant get take down by owner //= 0.9f - Fixed zeny reward not get deduct from quest owner. //= 0.9g - Remove the debugmes //= 1.0 - Fixed a minor bug //===== Todo: ================================================ //= 1. Change log from status to actual log and delete expired or completed request //= 2. Make it compatible with newest RANDOM OPTIONS Item //= 3. Add blacklist check //= 4. Add weight check //============================================================ - script Players Request Board::pqb -1,{ function postdetailverify; function getQuest; function requestitemchk; function requestitemget; function requestitemdel; function delrequest; function getquestdata; function setquestdata; function expiredchk; function selectRequest; function isequipment; function isitemset; function cleartemplist; function issetitemdetail; function initialize; Main: expiredchk(); mes .n$; mes "Welcome to"; mes "Player's Requesting Board."; next; mes "[ ^ff0000Players Request Info!^000000 ]"; mes " ~ Your Request -> "+CStr(getQuest("self"),(getQuest("self")?"Neutral":"RED")); mes " ~ Accepted Quest -> "+CStr(getQuest("accepted"),(getQuest("accepted")?"Neutral":"RED")); mes " ~ Available Request -> "+CStr(getQuest("available"),(getQuest("available")?"Neutral":"RED")); next; switch( select("Read information",(getQuest("available")?"View available request":""),(getQuest("accepted")?"View accepted request":""),(getQuest("self")<.post_limit?"Post new request":""),(getQuest("self")?"View my current request":"")) ){ case 1: // information here mes .n$; mes "A questing board which anyone can post request on it and other that meet the requirement can turn-in the request and claim the reward."; next; mes .n$; mes "Post limit per character: "+.post_limit; mes "Post fee per request: "+CZeny(.post_fee); break; case 2: // get unclaimed quest list selectRequest(0); break; case 3: // view acccepter quest list selectRequest(1); break; case 4: // denied posting if over posting limit per char or old quest still there OnPostSetup: // show details do{ [email protected] = postdetailverify(); debugmes "postdetailverify bool: "[email protected]; switch( select("Back",(@title$==""?"Set":"Change")+" Title",([email protected]_rq?"Set":"Change")+" Zeny request",(isitemset(0)?"Change":"Set")+" Item request",(@zeny_rq?"":([email protected]_rw?"Set":"Change")+" Zeny reward"),(isitemset(1)?"Change":"Set")+" Item reward",CStr("Post Request",([email protected]?"green":"red"))) ){ case 1: // back next; goto Main; case 2: // title input @title$; mes "Title change to "[email protected]$; break; case 3: // zeny request input @zeny_rq,0; mes "Zeny Request set to "[email protected]_rq; break; case 4: // item request @qbtype = 0; callshop "questingboard#shop",2; npcshopattach "questingboard#shop"; dispbottom "Sell the request items through the selling window dont worry the item will not actually be sold."; dispbottom "but only the first " + callfunc("F_InsertPlural",.item_set_max,"item") + " will be registered."; end; case 5: // zeny reward input @zeny_rw,0,Zeny; mes "Zeny Reward set to "[email protected]_rw; break; case 6: // item reward @qbtype = 1; callshop "questingboard#shop",2; npcshopattach "questingboard#shop"; dispbottom "Sell the reward items through the selling window dont worry the item will not actually be sold."; dispbottom "but only the first " + callfunc("F_InsertPlural",.item_set_max,"item") + " will be registered."; end; case 7: // post request if([email protected]){ mes "Requirement not meet!"; break; } mes "Confirm to post this request now?"; next; if(select("- No","- Yes (Cost "+CZeny(.post_fee)+(@zeny_rw?" + "+CZeny(@zeny_rw):"")+")")==1) break; Zeny = Zeny - .post_fee - @zeny_rw; // query to database query_sql("INSERT INTO questingboard SET title = '"[email protected]$+"', zeny_request = "[email protected]_rq+", zeny_reward = "[email protected]_rw+", requester_id = "+getcharid(0)+", requester_tick = "+(gettimetick(2)+.post_tick_length)); query_sql("SELECT id FROM questingboard ORDER BY id DESC LIMIT 1",[email protected]); for([email protected]=0;[email protected]<getarraysize(@request_nameid);[email protected]++){ query_sql("INSERT INTO questingboard_item SET type = 0, request_id = "[email protected]+",nameid = "[email protected]_nameid[[email protected]]+",amount = "[email protected]_quantity[[email protected]]+",identify = "[email protected]_identify[[email protected]]+",refine = "[email protected]_refine[[email protected]]+",attribute = "[email protected]_attribute[[email protected]]+",card0 = "[email protected]_card1[[email protected]]+",card1 = "[email protected]_card2[[email protected]]+",card2 = "[email protected]_card3[[email protected]]+",card3 = "[email protected]_card4[[email protected]]); } for([email protected]=0;[email protected]<getarraysize(@reward_nameid);[email protected]++){ delitem2(@reward_nameid[[email protected]],@reward_quantity[[email protected]],@reward_identify[[email protected]],@reward_refine[[email protected]],@reward_attribute[[email protected]],@reward_card1[[email protected]],@reward_card2[[email protected]],@reward_card3[[email protected]],@reward_card4[[email protected]]); query_sql("INSERT INTO questingboard_item SET type = 1, request_id = "[email protected]+",nameid = "[email protected]_nameid[[email protected]]+",amount = "[email protected]_quantity[[email protected]]+",identify = "[email protected]_identify[[email protected]]+",refine = "[email protected]_refine[[email protected]]+",attribute = "[email protected]_attribute[[email protected]]+",card0 = "[email protected]_card1[[email protected]]+",card1 = "[email protected]_card2[[email protected]]+",card2 = "[email protected]_card3[[email protected]]+",card3 = "[email protected]_card4[[email protected]]); } mes .n$; mes "Request successfully posted!"; announce strcharinfo(0)+" has submitted a new request called [" + @title$ + "] go check it out in the request board!",bc_all,0xFFFF00; @title$ = ""; @zeny_rq = 0; @zeny_rw = 0; cleartemplist(0); cleartemplist(1); next; goto Main; } next; }while(1==1); break; case 5: // my request list selectRequest(2); break; } next; goto Main; OnSellItem: cleartemplist(@qbtype); @size = getarraysize(@sold_nameid); if(@size>.item_set_max) @size = .item_set_max; for (@i = 0; @i < @size; @i++) { // should make a verify here // check if the item is allow to put on request if([email protected]){ // request 0 [email protected] = .item_min; [email protected] = .item_max; [email protected]$ = "Request"; // id @request_nameid[@i] = @sold_nameid[@i]; mes "Item "[email protected]$+" Setup ["+(@i+1)+"/"+(getarraysize(@sold_nameid))+"]"; if(isequipment(@sold_nameid[@i])) @request_quantity[@i] = 1; if([email protected]_quantity[@i]){ // amount mes CStr("?","red")+" x "+Itemlink( @sold_nameid[@i] ); mes "Range from "[email protected]+"-"[email protected]; input [email protected],[email protected],[email protected]; @request_quantity[@i] = [email protected]; mes CStr([email protected],"red")+" x "+Itemlink( @sold_nameid[@i] ); } if( getiteminfo(@sold_nameid[@i],2) == 4 || getiteminfo(@sold_nameid[@i],2) == 5 ){ // refine mes "+"+CStr("?","red")+" "+Itemlink( @sold_nameid[@i] ,1); mes "Range from 0-20"; input [email protected],0,20; @request_refine[@i] = [email protected]; mes ([email protected]?"+"+CStr([email protected],"red"):"Classic")+" "+Itemlink( @sold_nameid[@i] ,1); } // Temporary disable //@request_attribute[@i] = @sold_attribute[@i]; //@request_identify[@i] = @sold_identify[@i]; // temporary fix if(!isequipment(@sold_nameid[@i])) @request_identify[@i] = 1; else @request_identify[@i] = @sold_identify[@i]; //@request_card1[@i] = @sold_card1[@i]; //@request_card2[@i] = @sold_card2[@i]; //@request_card3[@i] = @sold_card3[@i]; //@request_card4[@i] = @sold_card4[@i]; next; } else { // reward 1 //[email protected] = 1; //[email protected] = countitem( @sold_nameid[@i] ); //[email protected]$ = "Reward"; @reward_nameid[@i] = @sold_nameid[@i]; @reward_quantity[@i] = @sold_quantity[@i]; @reward_refine[@i] = @sold_refine[@i]; @reward_attribute[@i] = @sold_attribute[@i]; // temporary fix if(!isequipment(@sold_nameid[@i])) @reward_identify[@i] = 1; else @reward_identify[@i] = @sold_identify[@i]; @reward_card1[@i] = @sold_card1[@i]; @reward_card2[@i] = @sold_card2[@i]; @reward_card3[@i] = @sold_card3[@i]; @reward_card4[@i] = @sold_card4[@i]; /* dispbottom "@reward_nameid["[email protected]+"] = "[email protected]_nameid[@i]; dispbottom "@reward_quantity["[email protected]+"] = "[email protected]_quantity[@i]; dispbottom "@reward_refine["[email protected]+"] = "[email protected]_refine[@i]; dispbottom "@reward_attribute["[email protected]+"] = "[email protected]_attribute[@i]; dispbottom "@reward_identify["[email protected]+"] = "[email protected]_identify[@i]; dispbottom "@reward_card1["[email protected]+"] = "[email protected]_card1[@i]; dispbottom "@reward_card2["[email protected]+"] = "[email protected]_card2[@i]; dispbottom "@reward_card3["[email protected]+"] = "[email protected]_card3[@i]; dispbottom "@reward_card4["[email protected]+"] = "[email protected]_card4[@i]; */ } } deletearray @sold_nameid,getarraysize(@sold_nameid); deletearray @sold_quantity,getarraysize(@sold_quantity); deletearray @sold_refine,getarraysize(@sold_refine); deletearray @sold_attribute,getarraysize(@sold_attribute); deletearray @sold_identify,getarraysize(@sold_identify); deletearray @sold_card1,getarraysize(@sold_card1); deletearray @sold_card2,getarraysize(@sold_card2); deletearray @sold_card3,getarraysize(@sold_card3); deletearray @sold_card4,getarraysize(@sold_card4); goto OnPostSetup; OnCheckQuest: mes "[ My Accepted Request ]"; selectRequest(1,1); // is check call end; /* @sold_nameid - item ID sold @sold_quantity - amount sold @sold_refine - refine count @sold_attribute - if the item is broken (1) or not (0) @sold_identify - if the item is identified (1) or not (0) @sold_card1 - card slot 1 @sold_card2 - card slot 2 @sold_card3 - card slot 3 @sold_card4 - card slot 4 */ function selectRequest { [email protected] = getarg(0); [email protected] = getarg(1,0); @page = 1; @index = 0; do{ expiredchk(); if([email protected]==0){ [email protected] = query_sql("SELECT id, title, requester_id, requester_tick, accepter_id, accepter_tick, status, zeny_request, zeny_reward FROM questingboard WHERE requester_id != "+getcharid(0)+" AND accepter_id != "+getcharid(0)+.sql_available_prefix$,[email protected],[email protected]$,[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]); } else if([email protected]==1){ [email protected] = query_sql("SELECT id, title, requester_id, requester_tick, accepter_id, accepter_tick, status, zeny_request, zeny_reward FROM questingboard WHERE accepter_id = "+getcharid(0)+.sql_accepted_prefix$,[email protected],[email protected]$,[email protected],[email protected],[email protected],[email protected]ck,[email protected],[email protected],[email protected]); } else if([email protected]==2){ [email protected] = query_sql("SELECT id, title, requester_id, requester_tick, accepter_id, accepter_tick, status, zeny_request, zeny_reward FROM questingboard WHERE requester_id = "+getcharid(0)+.sql_myrequest_prefix$,[email protected],[email protected]$,[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]); } @num = 0; [email protected]$ = ""; for([email protected][email protected];[email protected]<[email protected];[email protected]++){ if([email protected] >= [email protected]) break; [email protected]$ = [email protected]$ [email protected][[email protected]]+". "[email protected]$[[email protected]]+":"; @num++; @lastindex = [email protected]; } if(@lastindex+1 > .per_page){ // show previous page @prevpage = 1; //[email protected]$ = [email protected]$ + "Previous Page ("+(@page)+"/"+([email protected]/.per_page)+"):"; [email protected]$ = [email protected]$ + "<< Page "+(@page-1)+" <<:"; }else{ @prevpage = 0; [email protected]$ = [email protected]$ + ":"; } if([email protected] <= 0){ mes "List empty!"; return; } if([email protected] > @lastindex+1){ // show next page @nextpage = 1; //[email protected]$ = [email protected]$ + "Next Page ("+(@page)+"/"+([email protected]/.per_page)+"):"; [email protected]$ = [email protected]$ + ">> Page "+(@page+1)+" >>:"; }else{ @nextpage = 0; [email protected]$ = [email protected]$ + ":"; } //next; [email protected] = select([email protected]$); if([email protected] > @num ){ if([email protected][email protected]+1){ // previous button @index-=.per_page; @page--; //dispbottom "prev"; }else if([email protected][email protected]+2){ // next button @index+=.per_page; @page++; //dispbottom "next"; } }else{ [email protected] = [email protected][email protected]; [email protected] = 1; mes "["[email protected][[email protected]]+"] "[email protected]$[[email protected]],.linestring$; [email protected] = requestitemchk([email protected][[email protected]],0,([email protected]==1?1:0)); if([email protected][[email protected]]){ if(Zeny < [email protected][[email protected]]){ [email protected] = 0; } mes "Zeny Request:"," > "+CStr(CZeny([email protected][[email protected]]),Zeny<[email protected][[email protected]]?"red":"green"); } mes .linestring$; // check if have the set reward requestitemchk([email protected][[email protected]],1); if([email protected][[email protected]]){ mes "Zeny Reward:"," > "+CZeny([email protected][[email protected]]); } //next; if([email protected]==0){ if([email protected][[email protected]]-gettimetick(2) >= 0) mes "Request Expired: "+(getRemain([email protected][[email protected]]-gettimetick(2))); [email protected] = select("Back","Back to Main","Accept Request"); if([email protected]==2){ return; }else if([email protected]==3){ if(getquestdata([email protected][[email protected]],"accepter_id")){ // request occupied mes CStr("This request is no longer available!","red"); }else{ setquestdata([email protected][[email protected]],"accepter_id",getcharid(0)); if(gettimetick(2)+.accepter_tick_length > getquestdata([email protected][[email protected]],"requester_tick")){ setquestdata([email protected][[email protected]],"accepter_tick",getquestdata([email protected][[email protected]],"requester_tick")); }else{ setquestdata([email protected][[email protected]],"accepter_tick",gettimetick(2)+.accepter_tick_length); } mes "Request Accepted!"; dispbottom "[ " + strnpcinfo(0) + " ] request " + [email protected]$[[email protected]] + " has been accepted!"; } } } else if([email protected]==1) { if([email protected][[email protected]]-gettimetick(2) >= 0) mes "Request Expired: "+(getRemain([email protected][[email protected]]-gettimetick(2))); if([email protected][[email protected]]-gettimetick(2) >= 0) mes "Bind Expired: "+(getRemain([email protected][[email protected]]-gettimetick(2))); //dispbottom "[email protected] "[email protected]+" [email protected] "[email protected]; [email protected] = select("Back",([email protected]?"Back to Main":""),([email protected] && [email protected] && [email protected])?"Turn in Request":"")); if([email protected]==2){ return; } else if([email protected]==3) { if( gettimetick(2) >= getquestdata([email protected][[email protected]],"requester_tick") || gettimetick(2) >= getquestdata([email protected][[email protected]],"accepter_tick") ){ // request occupied mes CStr("This request is no longer available!","red"); } else { Zeny = Zeny - [email protected][[email protected]]; Zeny = Zeny + [email protected][[email protected]]; requestitemdel([email protected][[email protected]],0); // delete request item from accepter requestitemget([email protected][[email protected]],1); // get reward item setquestdata([email protected]id[[email protected]],"status",2); // status 2 = request completed / reward claimed mes "Request Turned In!"; dispbottom "[ " + strnpcinfo(0) + " ] request " + [email protected]$[[email protected]] + " has been turned in."; } } } else if([email protected]==2){ if([email protected][[email protected]]-gettimetick(2) >= 0 && [email protected][[email protected]] ==0) mes "Request Expired in "+(getRemain([email protected][[email protected]]-gettimetick(2))); if([email protected][[email protected]]) mes "Current Accepter > "+strcharinfo2(0,[email protected][[email protected]]); if([email protected][[email protected]]-gettimetick(2) >= 0) mes "Bind Expired in "+(getRemain([email protected][[email protected]]-gettimetick(2))); [email protected] = select("Back","Back to Main",(getquestdata([email protected][[email protected]],"status")==2?"Get Requested Item":""),(getquestdata([email protected][[email protected]],"status")!=2?"Take Down Request":""),(getquestdata([email protected][[email protected]],"status")==1?"Renew Request ("+CZeny(.post_fee)+")":"")); if([email protected]==2){ return; } else if([email protected]==3){ requestitemget([email protected][[email protected]],0); // get request item Zeny = Zeny + [email protected][[email protected]]; setquestdata([email protected][[email protected]],"status",3); // status 3 = request completed / request claimed mes "Request Completed!"; dispbottom "[ " + strnpcinfo(0) + " ] request " + [email protected]$[[email protected]] + " has been completed!"; } else if([email protected]==4){ Zeny = Zeny + [email protected][[email protected]]; requestitemget([email protected][[email protected]],1); // get back reward item delrequest([email protected][[email protected]]); mes "Request deleted!"; dispbottom "[ " + strnpcinfo(0) + " ] request on deleting [" + [email protected]$[[email protected]] + "]! Done."; } else if([email protected]==5){ if(Zeny < .post_fee){ mes "Not enough Zeny to renew this request!"; break; } Zeny = Zeny - .post_fee; setquestdata([email protected][[email protected]],"status",0); // status 0 = request active setquestdata([email protected][[email protected]],"requester_tick",gettimetick(2)+.post_tick_length); // renew quest length mes "Request renewed!"; dispbottom "[ " + strnpcinfo(0) + " ] Request " + [email protected]$[[email protected]] + " renewed!"; announce strcharinfo(0)+" has renewed a request Title: [" + [email protected]$ + "]",bc_all,0xFFFF00; } } next; } } while(1==1); } // function getquestdata { query_sql("SELECT "+getarg(1)+" FROM questingboard WHERE id = "+getarg(0),[email protected]); return [email protected]; } // function setquestdata { query_sql("UPDATE questingboard SET "+getarg(1)+" = "+getarg(2)+" WHERE id = "+getarg(0)); return; } // perform request expired check function expiredchk { query_sql("UPDATE questingboard SET accepter_id = 0, accepter_tick = 0 WHERE status = 0 AND accepter_tick <= "+gettimetick(2)); query_sql("UPDATE questingboard SET status = 1 WHERE status = 0 AND requester_tick <= "+gettimetick(2)); // send back the requester item to requester? return; } function getQuest { [email protected]$ = getarg(0); if([email protected]$=="available"){ query_sql("SELECT count(*) AS count FROM questingboard WHERE requester_id != "+getcharid(0)+" AND accepter_id != "+getcharid(0)+.sql_available_prefix$,[email protected]); }else if([email protected]$=="accepted"){ query_sql("SELECT count(*) AS count FROM questingboard WHERE accepter_id = "+getcharid(0)+.sql_accepted_prefix$,[email protected]); }else if([email protected]$=="self"){ query_sql("SELECT count(*) AS count FROM questingboard WHERE requester_id = "+getcharid(0)+.sql_myrequest_prefix$,[email protected]); } return [email protected]; } function getAvailableQuest { //[email protected] = query_sql("SELECT id FROM questingboard WHERE requester_id != "+getcharid(0),[email protected]); query_sql("SELECT count(*) AS count FROM questingboard WHERE requester_id != "+getcharid(0)+" AND accepter_id != "+getcharid(0)+.sql_available_prefix$,[email protected]); return [email protected]; } function getAcceptedQuest { query_sql("SELECT count(*) AS count FROM questingboard WHERE accepter_id = "+getcharid(0)+.sql_accepted_prefix$,[email protected]); return [email protected]; } function getMyRequest { query_sql("SELECT count(*) AS count FROM questingboard WHERE requester_id = "+getcharid(0)+.sql_myrequest_prefix$,[email protected]); return [email protected]; } function isitemset { [email protected] = getarg(0); // 0 request 1 reward [email protected]$ = "@"+([email protected]?"request":"reward"); for([email protected]=0;[email protected]<getarraysize(getd([email protected]$));[email protected]++){ if( getd([email protected]$+"_nameid["[email protected]+"]") && getd([email protected]$+"_quantity["[email protected]+"]") ) return 1; } return 0; } function cleartemplist { [email protected] = getarg(0); // 0 request 1 reward [email protected]$ = "@"+([email protected]?"request":"reward")+"_"; setarray [email protected]$,"nameid","quantity","refine","attribute","identify","card1","card2","card3","card4"; for([email protected]=0;[email protected]<getarraysize([email protected]$);[email protected]++) deletearray getd([email protected][email protected]$[[email protected]]),getarraysize(getd([email protected][email protected]$[[email protected]])); return; } function isequipment { return (getiteminfo(getarg(0),2)==4||getiteminfo(getarg(0),2)==5?1:0); } function issetitemdetail { [email protected] = getarg(0); // 0 request 1 reward [email protected]$ = ([email protected]?"request":"reward"); [email protected]$ = "@"[email protected]$+"_"; if(getarraysize( getd([email protected]$+"nameid") ) > 0){ [email protected] = 1; mes "Item "[email protected]$+":"; for([email protected]=0;[email protected]<getarraysize( getd([email protected]$+"nameid") );[email protected]++){ if([email protected]){ // get current inventory list to check whether special item is still exists for reward //debugmes "issetitemdetail: "+getitemname(getd([email protected]$+"nameid["[email protected]+"]")); //debugmes "issetitemdetail: is identify "+getd([email protected]$+"identify["[email protected]+"]"); [email protected] = countitem2(getd([email protected]$+"nameid["[email protected]+"]"),getd([email protected]$+"identify["[email protected]+"]"),getd([email protected]$+"refine["[email protected]+"]"),getd([email protected]$+"attribute["[email protected]+"]"),getd([email protected]$+"card1["[email protected]+"]"),getd([email protected]$+"card2["[email protected]+"]"),getd([email protected]$+"card3["[email protected]+"]"),getd([email protected]$+"card4["[email protected]+"]")); //dispbottom "[email protected] = "[email protected]; //debugmes "issetitemdetail: itemcount "+getitemname(getd([email protected]$+"nameid["[email protected]+"]"))+" = "[email protected]+" amount set: "+getd([email protected]$+"quantity["[email protected]+"]"); if([email protected] <= 0){ //[email protected] = 0; // now issufficient item will just get deleted from array instead dispbottom "["+strnpcinfo(0)+"]: You don't have any "+getitemname(getd([email protected]$+"nameid["[email protected]+"]"))+", removed it from reward list!"; deletearray getd([email protected]$+"nameid["[email protected]+"]"),1; deletearray getd([email protected]$+"quantity["[email protected]+"]"),1; deletearray getd([email protected]$+"refine["[email protected]+"]"),1; deletearray getd([email protected]$+"attribute["[email protected]+"]"),1; deletearray getd([email protected]$+"identify["[email protected]+"]"),1; deletearray getd([email protected]$+"card1["[email protected]+"]"),1; deletearray getd([email protected]$+"card2["[email protected]+"]"),1; deletearray getd([email protected]$+"card3["[email protected]+"]"),1; deletearray getd([email protected]$+"card4["[email protected]+"]"),1; [email protected]; continue; }else if( [email protected] < getd([email protected]$+"quantity["[email protected]+"]") && [email protected] > 0 ){ dispbottom "["+strnpcinfo(0)+"]: Reward amount of "+getitemname(getd([email protected]$+"nameid["[email protected]+"]"))+" been set from "+getd([email protected]$+"quantity["[email protected]+"]")+" > "[email protected]+" since this is only amount you got!"; set getd([email protected]$+"quantity["[email protected]+"]"),[email protected]; //[email protected] = 0; // now issufficient item will just set to current amount instead } } if(isequipment(getd([email protected]$+"nameid["[email protected]+"]"))){ if(getd([email protected]$+"identify["[email protected]+"]")){ mes ([email protected]+1)+". "+(getd([email protected]$+"refine["[email protected]+"]")?"+"+getd([email protected]$+"refine["[email protected]+"]")+" ":"")+Itemlink(getd([email protected]$+"nameid["[email protected]+"]"),1); for([email protected]=1;[email protected]<=4;[email protected]++){ mes (getitemname(getd([email protected]$+"card"[email protected]+"["[email protected]+"]"))=="null"?"":" S"[email protected]+" ["+Itemlink(getd([email protected]$+"card"[email protected]+"["[email protected]+"]"))+"]"); } }else{ mes ([email protected]+1)+". "+CStr("Unknown "+getitemname(getd([email protected]$+"nameid["[email protected]+"]")),"red"); } }else{ mes ([email protected]+1)+". "+getd([email protected]$+"quantity["[email protected]+"]")+" x "+Itemlink(getd([email protected]$+"nameid["[email protected]+"]")); } } } return [email protected]; } // requestitemchk(<requestid>,<type>{,<iscountitem>}) function requestitemchk { [email protected] = getarg(0); [email protected] = getarg(1,0); // 0 request 1 reward [email protected]$ = ([email protected]?"request":"reward"); [email protected] = getarg(2,0); [email protected] = query_sql("SELECT nameid, amount, identify, refine, attribute, card0, card1, card2, card3 FROM questingboard_item WHERE type = "[email protected]+" AND request_id = "[email protected],[email protected]id,[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]); if([email protected] <= 0){ //debugmes "requestitemchk: requestid "[email protected]+" type "[email protected]+" not found in questingboard_item table!"; return 1; } [email protected] = 1; mes "Item "[email protected]$+":"; for([email protected]=0;[email protected]<[email protected];[email protected]++){ if([email protected]){ [email protected] = countitem2([email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]]); if([email protected] && [email protected] < [email protected][[email protected]]) [email protected] = 0; } if(isequipment([email protected][[email protected]])){ if([email protected][[email protected]]){ mes ([email protected]+1)+". "+([email protected][[email protected]]?"+"[email protected][[email protected]]+" ":"")+Itemlink([email protected][[email protected]],1)+([email protected]?" ("+CStr([email protected]+"/"[email protected][[email protected]],([email protected] < [email protected][[email protected]]?"red":"green"))+")":""); for([email protected]=0;[email protected]<4;[email protected]++){ mes (getitemname(getd("[email protected]"[email protected]+"["[email protected]+"]"))=="null"?"":" S"+([email protected]+1)+" ["+Itemlink(getd("[email protected]"[email protected]+"["[email protected]+"]"))+"]"); } }else{ mes ([email protected]+1)+". "+CStr("Unknown "+getitemname([email protected][[email protected]]),"red"); } }else{ mes ([email protected]+1)+". "[email protected][[email protected]]+" x "+Itemlink([email protected][[email protected]])+([email protected]?" ("+CStr([email protected]+"/"[email protected][[email protected]],([email protected] < [email protected][[email protected]]?"red":"green"))+")":""); } } return [email protected]; } // requestitemget(<requestid>,<type>) function requestitemget { [email protected] = getarg(0); [email protected] = getarg(1,0); // 0 request 1 reward [email protected] = query_sql("SELECT nameid, amount, identify, refine, attribute, card0, card1, card2, card3 FROM questingboard_item WHERE type = "[email protected]+" AND request_id = "[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]); if([email protected] <= 0){ //debugmes "requestitemget: requestid "[email protected]+" type "[email protected]+" not found in questingboard_item table!"; return 0; } for([email protected]=0;[email protected]<[email protected];[email protected]++){ getitem2([email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]]); } return; } // requestitemdel(<requestid>,<type>) function requestitemdel { [email protected] = getarg(0); [email protected] = getarg(1,0); // 0 request 1 reward [email protected] = query_sql("SELECT nameid, amount, identify, refine, attribute, card0, card1, card2, card3 FROM questingboard_item WHERE type = "[email protected]+" AND request_id = "[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]); if([email protected] <= 0){ //debugmes "requestitemdel: requestid "[email protected]+" type "[email protected]+" not found in questingboard_item table!"; return 0; } for([email protected]=0;[email protected]<[email protected];[email protected]++){ delitem2([email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]],[email protected][[email protected]]); } return; } function delrequest { [email protected] = getarg(0); query_sql("DELETE FROM questingboard WHERE id = "[email protected]); query_sql("DELETE FROM questingboard_item WHERE request_id = "[email protected]); return; } // void function postdetailverify { [email protected] = 1; mes (@title$==""?CStr("Title not set","red"):@title$),.linestring$; [email protected] = issetitemdetail(0); if(@zeny_rq){ [email protected]++; mes "Zeny Request:"," > "+CZeny(@zeny_rq); } if([email protected] && [email protected]_rq){ [email protected] = 0; mes CStr("Request not set!","red"); } mes .linestring$; // check if have the set reward [email protected] = issetitemdetail(1); //debugmes "postdetailverify: [email protected] = "[email protected]; if(@zeny_rw){ if(Zeny < @zeny_rw+.post_fee){ [email protected] = 0; mes CStr("Not enough Zeny! "+CZeny(@zeny_rw+.post_fee)+" needed!","red"); } mes "Zeny Reward:"," > "+CStr(CZeny(@zeny_rw),([email protected]?"green":"red")); }else if(Zeny < .post_fee){ [email protected] = 0; mes CStr("Not enough Zeny! "+CZeny(.post_fee)+" needed!","red"); } if([email protected] && [email protected]_rw){ [email protected] = 0; mes CStr("Reward not set!","red"); } // last check if request is correctly set if( @title$=="") [email protected] = 0; return [email protected]; } function initialize { query_sql("CREATE TABLE IF NOT EXISTS `questingboard` (`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,`title` varchar(45) NOT NULL DEFAULT '',`requester_id` int(11) unsigned NOT NULL DEFAULT '0',`requester_tick` int(10) unsigned DEFAULT NULL,`accepter_id` int(11) unsigned NOT NULL DEFAULT '0',`accepter_tick` int(10) unsigned DEFAULT NULL,`status` tinyint(2) NOT NULL DEFAULT '0',`zeny_request` bigint(20) unsigned DEFAULT NULL,`zeny_reward` bigint(20) unsigned DEFAULT NULL,PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=126 DEFAULT CHARSET=latin1;"); query_sql("CREATE TABLE IF NOT EXISTS `questingboard_item` (`id` int(11) unsigned NOT NULL AUTO_INCREMENT,`request_id` int(11) unsigned NOT NULL DEFAULT '0',`type` tinyint(1) unsigned NOT NULL DEFAULT '0',`nameid` smallint(5) unsigned NOT NULL DEFAULT '0',`amount` smallint(11) unsigned NOT NULL DEFAULT '0',`identify` smallint(6) unsigned NOT NULL DEFAULT '0',`refine` tinyint(3) unsigned NOT NULL DEFAULT '0',`attribute` tinyint(4) unsigned NOT NULL DEFAULT '0',`card0` smallint(5) unsigned NOT NULL DEFAULT '0',`card1` smallint(5) unsigned NOT NULL DEFAULT '0',`card2` smallint(5) unsigned NOT NULL DEFAULT '0',`card3` smallint(5) unsigned NOT NULL DEFAULT '0',PRIMARY KEY (`id`),KEY `request_id` (`request_id`)) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;"); bindatcmd "checkquest",strnpcinfo(3)+"::OnCheckQuest"; return; } OnInit: .linestring$ = "________________________"; .n$ = "[ ^0000ffPlayers Request Board^000000 ]"; .post_fee = 1000000; // zeny fee when posting quest .post_tick_length = 12*60*60; // time before quest expired (default 24 hours) .accepter_tick_length = 1*60*60;// time before accepted quest get expired (default 1 hours) .post_limit = 1; // limit of post a char can put on .per_page = 3; // request amount per page .item_set_max = 5; // maximum item to be registered via selling window .item_min = 1; // minimum item request amount .item_max = 999; // maximum item request amount .sql_available_prefix$ = " AND status = 0 AND accepter_id = 0"; .sql_accepted_prefix$ = " AND status = 0"; .sql_myrequest_prefix$ = " AND status != 3"; initialize(); } - shop questingboard#shop 618,512:-1 prontera,154,174,5 duplicate(pqb) Players Request Board 837 My request is Add check for bounded, rental items when making it as a reward.
  2. I just found a solution, thanks for aleos for helping me out.
  3. I was planning on adding MVP monsters as a pet in my server, and I wanted to change it size when being hatched, a little small than its original size. Anyone knows how to do it? Thank you so much in advance.
  4. @Sehrentos is it possible to make the reward system like this? with the amount on it? // Event reward ID's (One random array is selected) setarray .loots_0, 501,10 , 502,10 , 503,10 , 504,10 , 505,10 , 506,10 ;
  5. Really? Where can i contact you? discord? much easier. heh
  6. I cant do that.. haha i just designed it and not sure if i will look for someone to code it.
  7. What kind of improvement do i need to do with it?
  8. Hey everyone, what do you think of the design for a thor patcher is it worth to code it or nah..
  9. Radian

    Refine Bonus

    @Cydh Can you update this mod for the latest git? Thank you
  10. I think you have no idea here, its the same script.
  11. Hey guys, you might know this amazing script https://github.com/rathena/rathena/blob/master/npc/custom/quests/quest_shop.txt that comes in the main trunk. Im requesting to change/add something to it. like adding multiple variables as requirements. Thanks in advance!
  12. @Cydh if you dont mind, can you update this one?
  13. Thanks @Tokei !! I'll try this and see what happened.