Advertisement
Baoulettes

sell_hercule_cards () Kary's Bot

Aug 7th, 2019
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.95 KB | None | 0 0
  1. def sell_hercule_cards ():
  2.     CardsList =p1 .get ('/cards')
  3.     O00O000O000OOOOO0 =[]
  4.     SellCountCheck =0
  5.     SellCardsList =[]
  6.     for SelectedCard in CardsList .json ()['cards']:
  7.         SelectedCardID =d1 .Cards .get_by_id (SelectedCard ['card_id']).id
  8.         if int (SelectedCardID )==1002630 or int (SelectedCardID )==1002640 or int (SelectedCardID )==1002650 or int (SelectedCardID )==1005480 or int (SelectedCardID )==1011480 or int (SelectedCardID )==1011481 :
  9.             SellCountCheck +=1
  10.             SellCardsList .append (SelectedCard ['id'])
  11.             if SellCountCheck ==99 :
  12.                 break
  13.     if SellCountCheck ==0 :
  14.         print ("Aucunes carte a vendre.")
  15.         return 0
  16.     SellCardsFunc ='/cards/sell'
  17.     ReturnCardsList ={'card_ids':SellCardsList }
  18.     CardsList =p1 .post (SellCardsFunc ,data =json .dumps (ReturnCardsList ))
  19.     print (str (len (SellCardsList ))+' statue(s) vendue')
  20.     if 'error'in CardsList .json ():
  21.         print (CardsList .json ()['error'])
  22.         return 0
  23.     get_user_info (only_zeni =True )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement