Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Casting Reanimation spells on arceuus spell book

Featured Replies

private void castReanimateSpell(MagicSpell spellToCast) throws InterruptedException
	{
		ArrayList<RS2Widget> allWidgets= new ArrayList<RS2Widget>();
		allWidgets.addAll(widgets.getAll());
		
		String spellNameFixer = spellToCast.toString();
		//the string starts out all caps. we want only first letter of each word to be caps.
		spellNameFixer = spellNameFixer.toLowerCase();
		//now we replace the underscore with a space
		spellNameFixer = spellNameFixer.replace('_', ' ');
		String[] storageArray = spellNameFixer.split(" ");
		String finalName = "";
		//build the final string out of the string array. while capatalizing the first
		// letter of each word
		for(String s : storageArray)
		{
			char temp = s.charAt(0);
			temp = Character.toUpperCase(temp);
			s = Character.toString(temp) + s.substring(1);
			finalName = finalName + s + " ";
			
		}
		//remove the last white space.
		//for some reason all the widget names start with this sequence.
		String temp = finalName.trim();
		finalName = "<col=00ff00>" + temp;
		
		//log("looking for spell " + finalName);
		if(magic.canCast(spellToCast))
		{
			//log("we can cast the spell");
			if(getTabs().getOpen() != Tab.MAGIC)
			{
				log("opening magic tab");
				getTabs().open(Tab.MAGIC);
				sleep(random(400,600));
			}
			ArrayList<RS2Widget> spellWidgetList = new ArrayList<RS2Widget>();
			spellWidgetList.addAll( widgets.getAll());
			
			for(RS2Widget rw : allWidgets)
			{
				if(rw != null && rw.isVisible() && rw.getSpellName().length() > 1)
				{
					if(rw.getSpellName().equals(finalName))
					{
						//log("selecting spell: " + finalName);
						rw.interact("Reanimate");
						sleep(random(50,80));
						break;
					}
					sleep(random(10,20));
				}
				
			}
		}
	}

hey guys, i noticed that it wasn't really possible to use the current cast spell function with the reanimation spells in the arceuus spell book so i made a function that would select the spell. please let me know if this helps, if my code is disgusting , or if its already been done and i just haven't found it yet. thanks! :)

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.