Thread: Anguish/Ascend money ticket guy help

Results 1 to 5 of 5
  1. #1 Anguish/Ascend money ticket guy help 
    Registered Member KushKings's Avatar
    Join Date
    Jul 2018
    Posts
    457
    Thanks given
    53
    Thanks received
    24
    Rep Power
    37
    i have npcOptionOne where u can talk to him and option two i have this

    case 3983:
    if (player.getItems().playerHasItem(995, 100000000)) {
    player.getItems().deleteItem(995, 100000000);
    player.getItems().addItem(620, 1);
    }
    break;

    is there any way i can make it in the same option to also sell the ticket back for 100m coins




    I tried this but it will only let u sell one back when u dont have coins on u as soon as u get coin from selling one and try again it takes coins away and gives you a ticket again

    case 3983:
    if (player.getItems().playerHasItem(995, 100000000)) {
    player.getItems().deleteItem(995, 100000000);
    player.getItems().addItem(620, 1);
    } else {
    if (player.getItems().playerHasItem(620, 1))
    player.getItems().deleteItem(620, 1);
    player.getItems().addItem(995, 100000000);
    }
    break;


    i know i could just add it in optiontThree but i would need a total of five options and only have 4 not sure how to add a option five in the game
    Attached image
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Dec 2019
    Age
    31
    Posts
    376
    Thanks given
    361
    Thanks received
    214
    Rep Power
    0
    Will this work?

    Code:
    	case 3983:
    			if (c.getItemAssistant().playerHasItem(620, 1)) {
    				c.getItemAssistant().addItem(995, 100000000);
    				c.getItemAssistant().deleteItem(620, 1);
    				c.getActionSender().sendMessage("You have sold @red@x1 Paramaya ticket for 100,000,000 coins.");
    			} else {
    				c.getItemAssistant().addItem(620, 1);
    				c.getItemAssistant().deleteItem(995, 100000000);
    				c.getActionSender().sendMessage("You have bought @red@x1 Paramaya ticket for 100,000,000 coins.");
    			}
    			break;
    Try using a boolean or an int to stop it from doing it?
    Reply With Quote  
     

  3. #3  
    Registered Member KushKings's Avatar
    Join Date
    Jul 2018
    Posts
    457
    Thanks given
    53
    Thanks received
    24
    Rep Power
    37
    Quote Originally Posted by Shadowpker View Post
    Will this work?

    Code:
    	case 3983:
    			if (c.getItemAssistant().playerHasItem(620, 1)) {
    				c.getItemAssistant().addItem(995, 100000000);
    				c.getItemAssistant().deleteItem(620, 1);
    				c.getActionSender().sendMessage("You have sold @red@x1 Paramaya ticket for 100,000,000 coins.");
    			} else {
    				c.getItemAssistant().addItem(620, 1);
    				c.getItemAssistant().deleteItem(995, 100000000);
    				c.getActionSender().sendMessage("You have bought @red@x1 Paramaya ticket for 100,000,000 coins.");
    			}
    			break;
    Try using a boolean or an int to stop it from doing it?


    Will give it a try here and a few and let you know

    Quote Originally Posted by KushKings View Post
    Will give it a try here and a few and let you know
    now it will let me buy one and when i click it again it sells it right back
    Attached image
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Dec 2019
    Age
    31
    Posts
    376
    Thanks given
    361
    Thanks received
    214
    Rep Power
    0
    Quote Originally Posted by KushKings View Post
    now it will let me buy one and when i click it again it sells it right back
    i thought that is what you wanted lol
    Attached image

    you could try adding a separate dialogue with two options buy and sell then call them from the case above.
    Reply With Quote  
     

  5. #5  
    Registered Member KushKings's Avatar
    Join Date
    Jul 2018
    Posts
    457
    Thanks given
    53
    Thanks received
    24
    Rep Power
    37
    Quote Originally Posted by Shadowpker View Post
    i thought that is what you wanted lol
    Attached image

    you could try adding a separate dialogue with two options buy and sell then call them from the case above.

    I got it to buy and sell tickets now and the buying part works fine.
    And u can sell the tickets back but when you dont have any tickets and click sell it gives you 1B coins.
    Any idea how i would fix that?

    Here is the code i have for selling the tickets..
    Code:
                                       case 3983:
                                                   if (player.getItems().playerHasItem(620, 1)) {
                                                       player.getItems().deleteItem(620, 1);
                                                       player.getItems().addItem(995, 100000000);
                                                    } else {
                                                   if (player.getItems().playerHasItem(5020, 1))
                                                       player.getItems().deleteItem(5020, 1);
                                                       player.getItems().addItem(995, 1000000000);
                                                       }
                                                 break;
    Attached image
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Anguish/Ascend Object help please
    By KushKings in forum Help
    Replies: 6
    Last Post: 02-16-2021, 09:49 PM
  2. Anguish/Ascend cannon help
    By KushKings in forum Help
    Replies: 0
    Last Post: 02-11-2021, 03:44 AM
  3. Anguish/Ascend animation help
    By ToxicKush in forum Help
    Replies: 0
    Last Post: 02-09-2021, 02:19 AM
  4. anguish/ascend help please
    By KushKings in forum Help
    Replies: 0
    Last Post: 01-31-2021, 09:57 PM
  5. Anguish/Ascend animation help
    By ToxicKush in forum Help
    Replies: 2
    Last Post: 10-25-2020, 06:51 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •